Bug 300610 - Add /knock, /map and/stats (simple) commands.

ChatZilla only.
r=silver
p=gijskruitbosch+bugs@gmail.com (Gijs Kruitbosch)
This commit is contained in:
silver%warwickcompsoc.co.uk 2005-12-25 22:25:29 +00:00
Родитель 66118848a4
Коммит 1f4e54315d
3 изменённых файлов: 22 добавлений и 4 удалений

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

@ -120,12 +120,14 @@ function initCommands()
["join-charset", cmdJoin, CMD_NEED_SRV | CMD_CONSOLE],
["kick", cmdKick, CMD_NEED_CHAN | CMD_CONSOLE],
["kick-ban", cmdKick, CMD_NEED_CHAN | CMD_CONSOLE],
["knock", cmdKnock, CMD_NEED_SRV | CMD_CONSOLE],
["leave", cmdLeave, CMD_NEED_CHAN | CMD_CONSOLE],
["links", cmdSimpleCommand, CMD_NEED_SRV | CMD_CONSOLE],
["list", cmdList, CMD_NEED_SRV | CMD_CONSOLE],
["list-plugins", cmdListPlugins, CMD_CONSOLE],
["load", cmdLoad, CMD_CONSOLE],
["log", cmdLog, CMD_CONSOLE],
["map", cmdSimpleCommand, CMD_NEED_SRV | CMD_CONSOLE],
["me", cmdMe, CMD_CONSOLE],
["motd", cmdSimpleCommand, CMD_NEED_SRV | CMD_CONSOLE],
["mode", cmdMode, CMD_NEED_SRV | CMD_CONSOLE],
@ -162,6 +164,7 @@ function initCommands()
["say", cmdSay, CMD_NEED_SRV | CMD_CONSOLE],
["server", cmdServer, CMD_CONSOLE],
["set-current-view", cmdSetCurrentView, 0],
["stats", cmdSimpleCommand, CMD_NEED_SRV | CMD_CONSOLE],
["squery", cmdSquery, CMD_NEED_SRV | CMD_CONSOLE],
["sslserver", cmdSSLServer, CMD_CONSOLE],
["stalk", cmdStalk, CMD_CONSOLE],
@ -624,8 +627,9 @@ function dispatchCommand (command, e, flags)
if (typeof e.command.func == "function")
{
/* dispatch a real function */
if (e.command.usage)
client.commandManager.parseArguments (e);
client.commandManager.parseArguments (e);
if ("parseError" in e)
{
displayUsageError(e, e.parseError);
@ -2933,6 +2937,12 @@ function cmdKick(e)
e.user.kick(e.reason);
}
function cmdKnock(e)
{
var rest = (e.reason ? " :" + fromUnicode(e.reason, e.server) : "") + "\n";
e.server.sendData("KNOCK " + fromUnicode(e.channelName, e.server) + rest);
}
function cmdClient(e)
{
dispatch("create-tab-for-view", { view: client });

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

@ -43,7 +43,7 @@ const __cz_version = "0.9.67+";
const __cz_condition = "green";
const __cz_suffix = "";
const __cz_guid = "59c81df5-4b7a-477b-912d-4e0fdf64e5f2";
const __cz_locale = "0.9.67.5";
const __cz_locale = "0.9.67.6";
var warn;
var ASSERT;

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

@ -69,7 +69,7 @@
#
### End of notes ###
locale.version = 0.9.67.5
locale.version = 0.9.67.6
locale.error = You are using ChatZilla %1$S, which requires the locale version %2$S. The currently selected locale, %3$S, is version %4$S, and therefore there may be problems running ChatZilla.\n\nIt is strongly advised that you update or remove the ChatZilla locale in question.
# Misc
@ -448,6 +448,9 @@ cmd.kick-ban.label = Kickban
cmd.kick-ban.params = <nickname> [<reason>]
cmd.kick-ban.help = Bans *!username@hostmask from the current channel, then kicks them off. Requires operator status.
cmd.knock.params = <channel-name> [<reason>]
cmd.knock.help = Requests an invitation from the specified channel with optional reason. This command is not supported by all servers.
cmd.label-user.format = «$nickname»
cmd.label-user.label = <unknown>
cmd.label-user.params = <unspecified>
@ -480,6 +483,8 @@ cmd.rlist.help = Lists channel name, user count, and topic information for the
cmd.reload-ui.help = Reload the ChatZilla XUL file. Used during development.
cmd.map.help = Similar to /links, but provides a graphical "Network Map" of the IRC network. Mainly used for routing purposes.
cmd.me.params = <action>
cmd.me.help = Sends the text <action> to the channel as a statement in the third person. Try it and see!
@ -548,6 +553,9 @@ cmd.save.help = Save the current view as file <filename>. If <filename> is omitt
cmd.say.params = <message>
cmd.say.help = Sends a message to the current view. This command is used automatically by ChatZilla when you type text that does not begin with the "/" character.
cmd.stats.params = [<params>]
cmd.stats.help = Request server statistics. Use this command with no parameters to get a server-specific list of available parameters for use with this command.
cmd.time.params = [<nickname>]
cmd.time.help = Asks <nickname> what time it is on their machine. Their IRC client may or may not show them that you've asked for this information. ChatZilla currently does not. If you do not specify <nickname>, ChatZilla will ask the server for the time it is on the server.