зеркало из https://github.com/mozilla/gecko-dev.git
Bug 299458 - Suggest /knock command (when supported by server) when channel joins fail. Auto-join channels when invited, for ones you had tried to join yourself earlier.
ChatZilla only. r=samuel a=bsmedberg
This commit is contained in:
Родитель
8f8cb98a88
Коммит
6cd76df2de
|
@ -2205,6 +2205,15 @@ function serv_pong (e)
|
|||
return true;
|
||||
}
|
||||
|
||||
CIRCServer.prototype.onInvite =
|
||||
function serv_invite(e)
|
||||
{
|
||||
e.channel = new CIRCChannel(this, null, e.params[2]);
|
||||
|
||||
e.destObject = this.parent;
|
||||
e.set = "network";
|
||||
}
|
||||
|
||||
CIRCServer.prototype.onNotice =
|
||||
function serv_notice (e)
|
||||
{
|
||||
|
|
|
@ -823,11 +823,30 @@ function my_unknown (e)
|
|||
var msg = getMsg("msg.err.irc." + e.code, null, "");
|
||||
if (msg)
|
||||
{
|
||||
this.display(msg);
|
||||
if (arrayIndexOf(e.server.channelTypes, e.params[0][0]) != -1)
|
||||
{
|
||||
// Message about a channel (e.g. join failed).
|
||||
e.channel = new CIRCChannel(e.server, null, e.params[0]);
|
||||
}
|
||||
|
||||
// Check for /knock support for the +i message.
|
||||
if (((e.code == 471) || (e.code == 473) || (e.code == 475)) &&
|
||||
("knock" in e.server.servCmds))
|
||||
{
|
||||
var args = [msg, e.channel.unicodeName,
|
||||
"knock " + e.channel.unicodeName];
|
||||
msg = getMsg("msg.err.irc." + e.code + ".knock", args, "");
|
||||
client.munger.entries[".inline-buttons"].enabled = true;
|
||||
this.display(msg);
|
||||
client.munger.entries[".inline-buttons"].enabled = false;
|
||||
}
|
||||
else
|
||||
{
|
||||
this.display(msg);
|
||||
}
|
||||
|
||||
if (e.channel)
|
||||
{
|
||||
if (e.channel.busy)
|
||||
{
|
||||
e.channel.busy = false;
|
||||
|
@ -1495,8 +1514,12 @@ function my_341 (e)
|
|||
CIRCNetwork.prototype.onInvite = /* invite message */
|
||||
function my_invite (e)
|
||||
{
|
||||
this.display (getMsg(MSG_INVITE_YOU, [e.user.unicodeName, e.user.name,
|
||||
e.user.host, e.params[2]]), "INVITE");
|
||||
this.display(getMsg(MSG_INVITE_YOU, [e.user.unicodeName, e.user.name,
|
||||
e.user.host, e.channel.unicodeName]),
|
||||
"INVITE");
|
||||
|
||||
if ("messages" in e.channel)
|
||||
e.channel.join();
|
||||
}
|
||||
|
||||
CIRCNetwork.prototype.on433 = /* nickname in use */
|
||||
|
|
|
@ -670,6 +670,11 @@ msg.err.irc.475 = This channel needs a key. You must provide the correct key to
|
|||
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').
|
||||
|
||||
# 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.warn.unk.command = Unknown command ``%S'', just guessing.
|
||||
|
||||
msg.val.on = on
|
||||
|
|
Загрузка…
Ссылка в новой задаче