diff --git a/locales/en-US/chrome/chatzilla.properties b/locales/en-US/chrome/chatzilla.properties --- a/locales/en-US/chrome/chatzilla.properties +++ b/locales/en-US/chrome/chatzilla.properties @@ -1537,10 +1537,10 @@ pref.hasPrefs.help = Indicates the object has preferences saved. Never shown in preferences window. :) pref.identd.enabled.label = Enable Identification Server during connection process pref.identd.enabled.help = Allows ChatZilla to connect to servers that require an ident response. -pref.initialURLs.label = Auto-connect URLs -pref.initialURLs.help = A list of IRC URLs to which ChatZilla should connect when starting. These will not be processed if ChatZilla was started by clicking on a hyperlink to an irc host. -pref.initialScripts.label = Auto-load scripts -pref.initialScripts.help = When ChatZilla starts, it loads all the scripts listed here. Each item is a URL, which may be relative to the profile directory. If an item is a directory itself, ChatZilla loads "init.js" from that directory, and any subdirectory. +pref.initialURLs.label = Locations +pref.initialURLs.help = A list of locations (irc: and ircs: URLs) to which ChatZilla should connect when starting. These will not be processed if ChatZilla was started by clicking on a hyperlink. +pref.initialScripts.label = Script files +pref.initialScripts.help = A list of script files (file: URLs) for ChatZilla to load when it starts. URLs may be relative to the profile directory. If a URL points to a directory, "init.js" from that directory and each subdirectory is loaded. pref.inputSpellcheck.label = Spellcheck the inputbox pref.inputSpellcheck.help = Whether or not the inputbox will be spellchecked. Only works on recent &brandShortName; builds. pref.link.focus.label = Focus browser when opening links @@ -1683,8 +1683,8 @@ pref.group.dcc.autoAccept.label = Auto-accept pref.group.munger.label = Formatting pref.group.startup.label = Startup -pref.group.startup.initialURLs.label = Auto-connect URLs -pref.group.startup.initialScripts.label = Auto-load scripts +pref.group.startup.initialURLs.label = Locations +pref.group.startup.initialScripts.label = Script files pref.group.lists.label = Lists pref.group.lists.stalkWords.label = Stalk words pref.group.lists.aliases.label = Command aliases diff --git a/xul/content/static.js b/xul/content/static.js --- a/xul/content/static.js +++ b/xul/content/static.js @@ -781,15 +781,25 @@ var baseURL = client.iosvc.newURI(basePath, null, null); for (var i = 0; i < scripts.length; ++i) { - var url = client.iosvc.newURI(scripts[i], null, baseURL); + try + { + var url = client.iosvc.newURI(scripts[i], null, baseURL); + var path = getFileFromURLSpec(url.spec); + } + catch(ex) + { + var params = ["initialScripts", scripts[i]]; + display(getMsg(MSG_ERR_INVALID_PREF, params), MT_ERROR); + dd(formatException(ex)); + continue; + } + if (url.scheme != "file" && url.scheme != "chrome") { display(getMsg(MSG_ERR_INVALID_SCHEME, scripts[i]), MT_ERROR); continue; } - var path = getFileFromURLSpec(url.spec); - if (!path.exists()) { display(getMsg(MSG_ERR_ITEM_NOT_FOUND, url.spec), MT_WARN); @@ -4638,6 +4648,19 @@ else if (o.server && "me" in o.server) me = o.server.me; + /* Allow for matching (but not identical) user objects here. This tends to + * happen with bouncers and proxies, when they send channel messages + * pretending to be from the user; the sourceObj is a CIRCChanUser + * instead of a CIRCUser so doesn't == 'me'. + */ + if (me) + { + if (sourceObj && (sourceObj.canonicalName == me.canonicalName)) + sourceObj = me; + if (destObj && (destObj.canonicalName == me.canonicalName)) + destObj = me; + } + // Let callers get away with "ME!" and we have to substitute here. if (sourceObj == "ME!") sourceObj = me;