зеркало из https://github.com/mozilla/gecko-dev.git
Bug 144037 - Add /oper command.
ChatZilla only. r=samuel p=gijskruitbosch+bugs@gmail.com (Gijs Kruitbosch)
This commit is contained in:
Родитель
6086a0a339
Коммит
a160c41e82
|
@ -140,6 +140,7 @@ function initCommands()
|
|||
["notice", cmdNotice, CMD_NEED_SRV | CMD_CONSOLE],
|
||||
["notify", cmdNotify, CMD_NEED_SRV | CMD_CONSOLE],
|
||||
["open-at-startup", cmdOpenAtStartup, CMD_CONSOLE],
|
||||
["oper", cmdOper, CMD_NEED_SRV | CMD_CONSOLE],
|
||||
["pass", cmdPass, CMD_NEED_NET | CMD_CONSOLE],
|
||||
["ping", cmdPing, CMD_NEED_SRV | CMD_CONSOLE],
|
||||
["plugin-pref", cmdPref, CMD_CONSOLE],
|
||||
|
@ -2634,6 +2635,19 @@ function cmdOpenAtStartup(e)
|
|||
}
|
||||
}
|
||||
|
||||
function cmdOper(e)
|
||||
{
|
||||
// Password is optional, if it is not given, we use a safe prompt.
|
||||
if (!e.password)
|
||||
e.password = promptPassword(getMsg(MSG_NEED_OPER_PASSWORD), "");
|
||||
|
||||
if (!e.password)
|
||||
return;
|
||||
|
||||
e.server.sendData("OPER " + fromUnicode(e.opername, e.server) + " " +
|
||||
fromUnicode(e.password, e.server) + "\n");
|
||||
}
|
||||
|
||||
function cmdPass(e)
|
||||
{
|
||||
/* Check we are connected, or at least pretending to be connected, so this
|
||||
|
|
|
@ -902,7 +902,7 @@ function my_unknown (e)
|
|||
e.params.shift(); /* and the dest. nick (always me) */
|
||||
|
||||
// Handle random IRC numerics automatically.
|
||||
var msg = getMsg("msg.err.irc." + e.code, null, "");
|
||||
var msg = getMsg("msg.irc." + e.code, null, "");
|
||||
if (msg)
|
||||
{
|
||||
if (arrayIndexOf(e.server.channelTypes, e.params[0][0]) != -1)
|
||||
|
@ -917,7 +917,7 @@ function my_unknown (e)
|
|||
{
|
||||
var args = [msg, e.channel.unicodeName,
|
||||
"knock " + e.channel.unicodeName];
|
||||
msg = getMsg("msg.err.irc." + e.code + ".knock", args, "");
|
||||
msg = getMsg("msg.irc." + e.code + ".knock", args, "");
|
||||
client.munger.entries[".inline-buttons"].enabled = true;
|
||||
this.display(msg);
|
||||
client.munger.entries[".inline-buttons"].enabled = false;
|
||||
|
@ -1440,7 +1440,7 @@ function my_464(e)
|
|||
{
|
||||
// If we are in the process of connecting we are needing a login
|
||||
// password, subtly different from after user registration.
|
||||
this.display(MSG_ERR_IRC_464_LOGIN);
|
||||
this.display(MSG_IRC_464_LOGIN);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
|
@ -528,6 +528,9 @@ cmd.op.help = Gives operator status to <nickname> on current channel. Requires
|
|||
cmd.open-at-startup.params = [<toggle>]
|
||||
cmd.open-at-startup.help = Used to add the current view to the list of views that will be automatically opened at startup. If <toggle> is not provided, the status of the current view will be displayed. <toggle> can be one of: yes, on, true, 1, no, off, false, 0, or toggle, to toggle the current state.
|
||||
|
||||
cmd.oper.params = <opername> [<password>]
|
||||
cmd.oper.help = Requests IRC Operator status from the current server. If <password> is not provided, you will be asked to enter the password in a prompt with a masked textfield (so nobody will be able to read it when you type it).
|
||||
|
||||
cmd.print.label = &Print...
|
||||
cmd.print.key = accel P
|
||||
cmd.print.params =
|
||||
|
@ -710,20 +713,24 @@ msg.err.unknown.host = The host application URL "%S" is not recognised. Please
|
|||
msg.err.unable.to.print = The current view does not support printing.
|
||||
msg.err.unsupported.command = The server does not support the ``%S'' command.
|
||||
|
||||
# Ask for oper pass if not explicitly given in the command:
|
||||
msg.need.oper.password = Please enter a password for obtaining IRC Operator privileges.
|
||||
|
||||
# Better IRC error messages
|
||||
msg.err.irc.464 = Incorrect password, please try again with the correct password.
|
||||
msg.err.irc.464.login = Please specify your password using the "/pass" command to continue connecting.
|
||||
msg.err.irc.471 = This channel has reached its set capacity; you cannot join it.
|
||||
msg.err.irc.473 = This channel is invite-only. You must have an invite from an existing member of the channel to join.
|
||||
msg.err.irc.474 = You are banned from this channel.
|
||||
msg.err.irc.475 = This channel needs a key. You must provide the correct key to join the channel. See "/help join" for details on joining a channel with a key.
|
||||
msg.err.irc.477 = This channel requires that you have registered and identified yourself with the network's nickname registration services (e.g. NickServ). Please see the documentation of this network's nickname registration services that should be found in the MOTD (/motd to display it).
|
||||
msg.err.irc.491 = Only few of mere mortals may try to enter the twilight zone (your host did not match any configured 'O-lines').
|
||||
msg.irc.381 = You are now an IRC Operator.
|
||||
msg.irc.464 = Incorrect password, please try again with the correct password.
|
||||
msg.irc.464.login = Please specify your password using the "/pass" command to continue connecting.
|
||||
msg.irc.471 = This channel has reached its set capacity; you cannot join it.
|
||||
msg.irc.473 = This channel is invite-only. You must have an invite from an existing member of the channel to join.
|
||||
msg.irc.474 = You are banned from this channel.
|
||||
msg.irc.475 = This channel needs a key. You must provide the correct key to join the channel. See "/help join" for details on joining a channel with a key.
|
||||
msg.irc.477 = This channel requires that you have registered and identified yourself with the network's nickname registration services (e.g. NickServ). Please see the documentation of this network's nickname registration services that should be found in the MOTD (/motd to display it).
|
||||
msg.irc.491 = Only few of mere mortals may try to enter the twilight zone (your host did not match any configured 'O-lines').
|
||||
|
||||
# This is an extended version that is only used if the server support /knock.
|
||||
msg.err.irc.471.knock = %S You might be able to use "/knock %S" to ask the channel operators to invite you in. [[Knock][Asks the channel operators to let you in][%S]]
|
||||
msg.err.irc.473.knock = %S Use "/knock %S" to ask the channel operators to invite you in. [[Knock][Asks the channel operators to let you in][%S]]
|
||||
msg.err.irc.475.knock = %S You might be able to use "/knock %S" to ask the channel operators to invite you in. [[Knock][Asks the channel operators to let you in][%S]]
|
||||
msg.irc.471.knock = %S You might be able to use "/knock %S" to ask the channel operators to invite you in. [[Knock][Asks the channel operators to let you in][%S]]
|
||||
msg.irc.473.knock = %S Use "/knock %S" to ask the channel operators to invite you in. [[Knock][Asks the channel operators to let you in][%S]]
|
||||
msg.irc.475.knock = %S You might be able to use "/knock %S" to ask the channel operators to invite you in. [[Knock][Asks the channel operators to let you in][%S]]
|
||||
|
||||
msg.warn.unk.command = Unknown command ``%S'', just guessing.
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче