Bug 347483 - Don't check for usermode prefixes if we don't know of any yet (fixes notices before 001).

ChatZilla only.
r=samuel
This commit is contained in:
silver%warwickcompsoc.co.uk 2006-09-01 22:47:46 +00:00
Родитель 0ea2d2bc96
Коммит f017e58a46
1 изменённых файлов: 16 добавлений и 10 удалений

Просмотреть файл

@ -2288,13 +2288,16 @@ function serv_notice (e)
{
var targetName = e.params[1];
// Strip off one (and only one) user mode prefix.
for (var i = 0; i < this.userModes.length; i++)
if (this.userModes)
{
if (targetName[0] == this.userModes[i].symbol)
// Strip off one (and only one) user mode prefix.
for (var i = 0; i < this.userModes.length; i++)
{
targetName = targetName.substr(1);
break;
if (targetName[0] == this.userModes[i].symbol)
{
targetName = targetName.substr(1);
break;
}
}
}
@ -2339,13 +2342,16 @@ function serv_privmsg (e)
{
var targetName = e.params[1];
// Strip off one (and only one) user mode prefix.
for (var i = 0; i < this.userModes.length; i++)
if (this.userModes)
{
if (targetName[0] == this.userModes[i].symbol)
// Strip off one (and only one) user mode prefix.
for (var i = 0; i < this.userModes.length; i++)
{
targetName = targetName.substr(1);
break;
if (targetName[0] == this.userModes[i].symbol)
{
targetName = targetName.substr(1);
break;
}
}
}