Bug 1130001 - Handle IRC message 470: Channel redirect. r=clokep
--HG-- extra : amend_source : dc94a76d2948c5d0f915062deaafff743cfa5941
This commit is contained in:
Родитель
5a6a13fd93
Коммит
aaa56fc72d
|
@ -148,7 +148,7 @@ message.ping=Ping reply from %1$S in #2 millisecond.;Ping reply from %1$S in #2
|
|||
|
||||
|
||||
# LOCALIZATION NOTE (error.*):
|
||||
# These are shown as error messages in the server tab.
|
||||
# These are shown as error messages in the conversation or server tab.
|
||||
# %S is the channel name.
|
||||
error.noChannel=There is no channel: %S.
|
||||
error.tooManyChannels=Cannot join %S; you've joined too many channels.
|
||||
|
@ -173,6 +173,9 @@ error.notChannelOp=You are not a channel operator on %S.
|
|||
error.notChannelOwner=You are not a channel owner of %S.
|
||||
error.wrongKey=Cannot join %S, invalid channel password.
|
||||
error.sendMessageFailed=An error occurred while sending your last message. Please try again once the connection has been reestablished.
|
||||
# %1$S is the channel the user tried to join, %2$S is the channel
|
||||
# he was forwarded to.
|
||||
error.channelForward=You may not join %1$S, and were automatically redirected to %2$S.
|
||||
|
||||
# LOCALIZATION NOTE (tooltip.*):
|
||||
# These are the descriptions given in a tooltip with information received
|
||||
|
|
|
@ -175,6 +175,17 @@ var ircNonStandard = {
|
|||
aMessage.params[1] == "Password required";
|
||||
},
|
||||
|
||||
"470": function(aMessage) { // Channel forward (Unreal, inspircd)
|
||||
// <requested channel> <redirect channel>: You may not join this channel,
|
||||
// so you are automatically being transferred to the redirect channel.
|
||||
// Join redirect channel so when the automatic join happens, we are
|
||||
// not surprised.
|
||||
this.joinChat(this.getChatRoomDefaultFieldValues(aMessage.params[2]));
|
||||
// Mark requested channel as left and add a system message.
|
||||
return conversationErrorMessage(this, aMessage, "error.channelForward",
|
||||
true, false);
|
||||
},
|
||||
|
||||
"499": function(aMessage) { // ERR_CHANOWNPRIVNEEDED (Unreal)
|
||||
// <channel> :You're not the channel owner (status +q is needed)
|
||||
return conversationErrorMessage(this, aMessage, "error.notChannelOwner");
|
||||
|
|
|
@ -221,7 +221,8 @@ function mIRCColoring(aStack, aInput) {
|
|||
function conversationErrorMessage(aAccount, aMessage, aError,
|
||||
aJoinFailed = false, aRejoinable = true) {
|
||||
let conv = aAccount.getConversation(aMessage.params[1]);
|
||||
conv.writeMessage(aMessage.origin, _(aError, aMessage.params[1]),
|
||||
conv.writeMessage(aMessage.origin, _(aError, aMessage.params[1],
|
||||
aMessage.params[2] || undefined),
|
||||
{error: true, system: true});
|
||||
delete conv._pendingMessage;
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче