Bug 812921 - Land in comm-central Instantbird's changes to chat/ - 4 - Bio 1697 - Update /mode command syntax, r=clokep.

This commit is contained in:
aleth 2012-10-26 06:43:10 +02:00
Родитель 64a605f947
Коммит 8396318668
2 изменённых файлов: 6 добавлений и 4 удалений

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

@ -52,7 +52,8 @@ command.join=%S <room1>[ <key1>][,<room2>[ <key2>]]*: En
command.kick=%S <nick> [<message>]: Remove someone from a channel. You must be a channel operator to do this.
command.list=%S: Display a list of chat rooms on the network. Warning, some servers may disconnect you upon doing this.
command.memoserv=%S <command>: Send a command to MemoServ.
command.mode=%S [<channel>] [(+|-)<new mode>] [<nick>]: Set or unset a channel or user mode.
command.modeUser=%S (+|-)<new mode> [<nick>]: Set or unset a user's mode.
command.modeChannel=%S <channel>[ (+|-)<new mode> [<parameter>][,<parameter>]*]: Get, set or unset a channel mode.
command.msg=%S <nick> <message>: Send a private message to a user (as opposed to a channel).
command.nick=%S <new nickname>: Change your nickname.
command.nickserv=%S <command>: Send a command to NickServ.

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

@ -204,7 +204,8 @@ var commands = [
},
{
name: "mode",
get helpString() _("command.mode", "mode"),
get helpString() _("command.modeUser", "mode") + "\n" +
_("command.modeChannel", "mode"),
run: function(aMsg, aConv) {
function isMode(aString) "+-".indexOf(aString[0]) != -1;
let params = splitInput(aMsg);
@ -242,8 +243,8 @@ var commands = [
else if ((!isChannelName && !isOwnNick) || !isMode(params[1]))
return false;
}
// Otherwise a channel name, new mode and a nick were given or a channel
// name and a mode were given. If this is not true, return false.
// Otherwise a channel name, new mode, and at least one parameter
// was given. If this is not true, return false.
else if (!(isChannelName && isMode(params[1])))
return false;