Bug 259197 - Make <text> optional for /stalk, and fix the command's code. Also correct enumeration of stalk items.
ChatZilla only. r=samuel@sieb.net
This commit is contained in:
Родитель
0839a484e6
Коммит
cd02689319
|
@ -2270,6 +2270,8 @@ function cmdNotify(e)
|
|||
|
||||
function cmdStalk(e)
|
||||
{
|
||||
var list = client.prefs["stalkWords"];
|
||||
|
||||
if (!e.text)
|
||||
{
|
||||
if (list.length == 0)
|
||||
|
@ -2279,8 +2281,8 @@ function cmdStalk(e)
|
|||
return;
|
||||
}
|
||||
|
||||
client.prefs["stalkWords"].push(e.text);
|
||||
client.prefs["stalkWords"].update();
|
||||
list.push(e.text);
|
||||
list.update();
|
||||
|
||||
display(getMsg(MSG_STALK_ADD, e.text));
|
||||
}
|
||||
|
@ -2290,7 +2292,7 @@ function cmdUnstalk(e)
|
|||
e.text = e.text.toLowerCase();
|
||||
var list = client.prefs["stalkWords"];
|
||||
|
||||
for (i in list)
|
||||
for (var i = 0; i < list.length; ++i)
|
||||
{
|
||||
if (list[i].toLowerCase() == e.text)
|
||||
{
|
||||
|
|
|
@ -471,8 +471,8 @@ cmd.sslserver.help = Connects to server using SSL <hostname> on <port>, or 999
|
|||
cmd.squery.params = <service> [<commands>]
|
||||
cmd.squery.help = Sends the commands <commands> to the service <service>.
|
||||
|
||||
cmd.stalk.params = <text>
|
||||
cmd.stalk.help = Add text to list of words for which you would like to see alerts. Whenever a person with a nickname matching <text> speaks, or someone says a phrase containing <text>, your ChatZilla window will become active (on some operating systems) and its taskbar icon will flash (on some operating systems.)
|
||||
cmd.stalk.params = [<text>]
|
||||
cmd.stalk.help = Add <text> to list of words for which you would like to see alerts. Whenever a person with a nickname matching <text> speaks, or someone says a phrase containing <text>, your ChatZilla window will become active (on some operating systems) and its taskbar icon will flash (on some operating systems.) If <text> is omitted the list of stalk words is displayed.
|
||||
|
||||
cmd.status.help = Shows status information for the current view.
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче