Bug 263185 - Make sure URL handling does not ignore the 4 known channel prefixes, even if the server trys to make us.

ChatZilla only.
r=samuel
p=gijskruitbosch+bugs@gmail.com (Gijs Kruitbosch)
This commit is contained in:
silver%warwickcompsoc.co.uk 2005-12-09 14:03:03 +00:00
parent 9c88d4e4a8
commit c17ff01b97
2 changed files with 8 additions and 2 deletions

View File

@ -2206,8 +2206,11 @@ function cmdJoin(e)
return chan;
}
if (arrayIndexOf(e.server.channelTypes, e.channelName[0]) == -1)
if ((arrayIndexOf(["#", "&", "+", "!"], e.channelName[0]) == -1) &&
(arrayIndexOf(e.server.channelTypes, e.channelName[0]) == -1))
{
e.channelName = e.server.channelTypes[0] + e.channelName;
}
var charset = e.charset ? e.charset : e.network.prefs["charset"];
e.channel = e.server.addChannel(e.channelName, charset);

View File

@ -2196,8 +2196,11 @@ function gotoIRCURL (url)
* NOTE: This is always a "#" so that URLs may be compared
* properly without involving the server (e.g. off-line).
*/
if (arrayIndexOf(serv.channelTypes, target[0]) == -1)
if ((arrayIndexOf(["#", "&", "+", "!"], target[0]) == -1) &&
(arrayIndexOf(serv.channelTypes, target[0]) == -1))
{
target = "#" + target;
}
var chan = new CIRCChannel(serv, null, target);