зеркало из https://github.com/mozilla/pjs.git
Bug 361914 - hostmasks should not be formatted as mailto urls
r=silver@warwickcompsoc.co.uk (James Ross) ChatZilla Only.
This commit is contained in:
Родитель
df6c46c7dd
Коммит
2a902b6b6e
|
@ -1900,7 +1900,9 @@ function cmdMe(e)
|
|||
}
|
||||
|
||||
var msg = filterOutput(e.action, "ACTION", e.sourceObject);
|
||||
client.munger.entries[".mailto"].enabled = client.prefs["munger.mailto"];
|
||||
e.sourceObject.display(msg, "ACTION", "ME!", e.sourceObject);
|
||||
client.munger.entries[".mailto"].enabled = false;
|
||||
e.sourceObject.act(msg);
|
||||
}
|
||||
|
||||
|
@ -2107,7 +2109,9 @@ function cmdSay(e)
|
|||
}
|
||||
|
||||
var msg = filterOutput(e.message, "PRIVMSG", e.sourceObject);
|
||||
client.munger.entries[".mailto"].enabled = client.prefs["munger.mailto"];
|
||||
e.sourceObject.display(msg, "PRIVMSG", "ME!", e.sourceObject);
|
||||
client.munger.entries[".mailto"].enabled = false;
|
||||
e.sourceObject.say(msg);
|
||||
}
|
||||
|
||||
|
@ -2116,7 +2120,9 @@ function cmdMsg(e)
|
|||
var target = e.server.addTarget(e.nickname);
|
||||
|
||||
var msg = filterOutput(e.message, "PRIVMSG", target);
|
||||
client.munger.entries[".mailto"].enabled = client.prefs["munger.mailto"];
|
||||
e.sourceObject.display(msg, "PRIVMSG", "ME!", target);
|
||||
client.munger.entries[".mailto"].enabled = false;
|
||||
target.say(msg);
|
||||
}
|
||||
|
||||
|
@ -2149,7 +2155,9 @@ function cmdNotice(e)
|
|||
var target = e.server.addTarget(e.nickname);
|
||||
|
||||
var msg = filterOutput(e.message, "NOTICE", target);
|
||||
client.munger.entries[".mailto"].enabled = client.prefs["munger.mailto"];
|
||||
e.sourceObject.display(msg, "NOTICE", "ME!", target);
|
||||
client.munger.entries[".mailto"].enabled = false;
|
||||
target.notice(msg);
|
||||
}
|
||||
|
||||
|
@ -3035,7 +3043,9 @@ function cmdVersion(e)
|
|||
|
||||
function cmdEcho(e)
|
||||
{
|
||||
client.munger.entries[".mailto"].enabled = client.prefs["munger.mailto"];
|
||||
display(e.message);
|
||||
client.munger.entries[".mailto"].enabled = false;
|
||||
}
|
||||
|
||||
function cmdInvite(e)
|
||||
|
|
|
@ -1142,7 +1142,9 @@ function my_ctcprunk (e)
|
|||
CIRCNetwork.prototype.onNotice =
|
||||
function my_notice (e)
|
||||
{
|
||||
client.munger.entries[".mailto"].enabled = client.prefs["munger.mailto"];
|
||||
this.display(e.decodeParam(2), "NOTICE", this, e.server.me);
|
||||
client.munger.entries[".mailto"].enabled = false;
|
||||
}
|
||||
|
||||
/* userhost reply */
|
||||
|
@ -2141,7 +2143,9 @@ function my_cprivmsg (e)
|
|||
{
|
||||
var msg = e.decodeParam(2);
|
||||
|
||||
client.munger.entries[".mailto"].enabled = client.prefs["munger.mailto"];
|
||||
this.display (msg, "PRIVMSG", e.user, this);
|
||||
client.munger.entries[".mailto"].enabled = false;
|
||||
}
|
||||
|
||||
/* end of names */
|
||||
|
@ -2182,7 +2186,7 @@ CIRCChannel.prototype.onTopic = /* user changed topic */
|
|||
CIRCChannel.prototype.on332 = /* TOPIC reply */
|
||||
function my_topic (e)
|
||||
{
|
||||
|
||||
client.munger.entries[".mailto"].enabled = client.prefs["munger.mailto"];
|
||||
if (e.code == "TOPIC")
|
||||
this.display (getMsg(MSG_TOPIC_CHANGED, [this.topicBy, this.topic]),
|
||||
"TOPIC");
|
||||
|
@ -2203,7 +2207,7 @@ function my_topic (e)
|
|||
|
||||
this.updateHeader();
|
||||
updateTitle(this);
|
||||
|
||||
client.munger.entries[".mailto"].enabled = false;
|
||||
}
|
||||
|
||||
CIRCChannel.prototype.on333 = /* Topic setter information */
|
||||
|
@ -2285,13 +2289,17 @@ function my_needops(e)
|
|||
CIRCChannel.prototype.onNotice =
|
||||
function my_notice (e)
|
||||
{
|
||||
client.munger.entries[".mailto"].enabled = client.prefs["munger.mailto"];
|
||||
this.display(e.decodeParam(2), "NOTICE", e.user, this);
|
||||
client.munger.entries[".mailto"].enabled = false;
|
||||
}
|
||||
|
||||
CIRCChannel.prototype.onCTCPAction =
|
||||
function my_caction (e)
|
||||
{
|
||||
client.munger.entries[".mailto"].enabled = client.prefs["munger.mailto"];
|
||||
this.display (e.CTCPData, "ACTION", e.user, this);
|
||||
client.munger.entries[".mailto"].enabled = false;
|
||||
}
|
||||
|
||||
CIRCChannel.prototype.onUnknownCTCP =
|
||||
|
@ -2582,7 +2590,9 @@ function my_cprivmsg(e)
|
|||
openQueryTab(e.server, e.user.unicodeName);
|
||||
}
|
||||
|
||||
client.munger.entries[".mailto"].enabled = client.prefs["munger.mailto"];
|
||||
this.display(e.decodeParam(2), "PRIVMSG", e.user, e.server.me);
|
||||
client.munger.entries[".mailto"].enabled = false;
|
||||
}
|
||||
|
||||
CIRCUser.prototype.onNick =
|
||||
|
@ -2609,6 +2619,7 @@ CIRCUser.prototype.onNotice =
|
|||
function my_notice (e)
|
||||
{
|
||||
var msg = e.decodeParam(2);
|
||||
var displayMailto = client.prefs["munger.mailto"];
|
||||
|
||||
var ary = msg.match(/^\[(\S+)\]\s+/);
|
||||
if (ary)
|
||||
|
@ -2616,12 +2627,16 @@ function my_notice (e)
|
|||
var channel = e.server.getChannel(ary[1]);
|
||||
if (channel)
|
||||
{
|
||||
client.munger.entries[".mailto"].enabled = displayMailto;
|
||||
channel.display(msg, "NOTICE", this, e.server.me);
|
||||
client.munger.entries[".mailto"].enabled = false;
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
client.munger.entries[".mailto"].enabled = displayMailto;
|
||||
this.display(msg, "NOTICE", this, e.server.me);
|
||||
client.munger.entries[".mailto"].enabled = false;
|
||||
}
|
||||
|
||||
CIRCUser.prototype.onCTCPAction =
|
||||
|
@ -2634,7 +2649,9 @@ function my_uaction(e)
|
|||
openQueryTab(e.server, e.user.unicodeName);
|
||||
}
|
||||
|
||||
client.munger.entries[".mailto"].enabled = client.prefs["munger.mailto"];
|
||||
this.display(e.CTCPData, "ACTION", this, e.server.me);
|
||||
client.munger.entries[".mailto"].enabled = false;
|
||||
}
|
||||
|
||||
CIRCUser.prototype.onUnknownCTCP =
|
||||
|
@ -2807,13 +2824,17 @@ function my_dccgetparams()
|
|||
CIRCDCCChat.prototype.onPrivmsg =
|
||||
function my_dccprivmsg(e)
|
||||
{
|
||||
client.munger.entries[".mailto"].enabled = client.prefs["munger.mailto"];
|
||||
this.displayHere(toUnicode(e.line, this), "PRIVMSG", e.user, "ME!");
|
||||
client.munger.entries[".mailto"].enabled = false;
|
||||
}
|
||||
|
||||
CIRCDCCChat.prototype.onCTCPAction =
|
||||
function my_uaction(e)
|
||||
{
|
||||
client.munger.entries[".mailto"].enabled = client.prefs["munger.mailto"];
|
||||
this.displayHere(e.CTCPData, "ACTION", e.user, "ME!");
|
||||
client.munger.entries[".mailto"].enabled = false;
|
||||
}
|
||||
|
||||
CIRCDCCChat.prototype.onUnknownCTCP =
|
||||
|
|
|
@ -444,7 +444,10 @@ function updateChannel()
|
|||
{
|
||||
var data = getObjectDetails(view);
|
||||
data.dontLogURLs = true;
|
||||
var mailto = client.prefs["munger.mailto"];
|
||||
client.munger.entries[".mailto"].enabled = mailto;
|
||||
var nodes = client.munger.munge(view.topic, null, data);
|
||||
client.munger.entries[".mailto"].enabled = false;
|
||||
header["topicnodes"].appendChild(adoptNode(nodes));
|
||||
}
|
||||
else
|
||||
|
|
|
@ -3629,10 +3629,7 @@ function cli_say(msg)
|
|||
{
|
||||
if ("say" in client.currentObject)
|
||||
{
|
||||
msg = filterOutput(msg, "PRIVMSG", client.currentObject);
|
||||
display(msg, "PRIVMSG", "ME!", client.currentObject);
|
||||
client.currentObject.say(msg);
|
||||
|
||||
client.currentObject.dispatch("say " + msg);
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
|
@ -75,9 +75,9 @@ function initMunger()
|
|||
munger.addRule (".mirc-reverse", /(\x16)/, mircReverseColor);
|
||||
munger.addRule ("ctrl-char", /([\x01-\x1f])/, showCtrlChar);
|
||||
munger.addRule ("link", client.linkRE, insertLink);
|
||||
munger.addRule ("mailto",
|
||||
munger.addRule (".mailto",
|
||||
/(?:\s|\W|^)((mailto:)?[^<>\[\]()\'\"\s\u201d]+@[^.<>\[\]()\'\"\s\u201d]+\.[^<>\[\]()\'\"\s\u201d]+)/i,
|
||||
insertMailToLink);
|
||||
insertMailToLink, false);
|
||||
munger.addRule ("bugzilla-link",
|
||||
/(?:\s|\W|^)(bug\s+(?:#?\d{3,6}|#[^\s,]{1,20}))/i,
|
||||
insertBugzillaLink);
|
||||
|
|
Загрузка…
Ссылка в новой задаче