Bug 299458 - Redirect notices starting with [#channel] to that channel's view, if it exists.

ChatZilla only.
r=rginda


git-svn-id: svn://10.0.0.236/trunk@180722 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
silver%warwickcompsoc.co.uk 2005-09-21 01:07:57 +00:00
parent 2f9257c69d
commit 5ef0bf9957

View File

@ -2279,7 +2279,20 @@ function my_unick (e)
CIRCUser.prototype.onNotice =
function my_notice (e)
{
this.display(e.decodeParam(2), "NOTICE", this, e.server.me);
var msg = e.decodeParam(2);
var ary = msg.match(/^\[(\S+)\]\s+/);
if (ary)
{
var channel = e.server.getChannel(ary[1]);
if (channel)
{
channel.display(msg, "NOTICE", this, e.server.me);
return;
}
}
this.display(msg, "NOTICE", this, e.server.me);
}
CIRCUser.prototype.onCTCPAction =