Bug 408357 - Error when the invite command is used in Private Chat.

r=silver@warwickcompsoc.co.uk (James Ross)
ChatZilla Only. NPOTFFB.


git-svn-id: svn://10.0.0.236/trunk@241347 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
gijskruitbosch%gmail.com 2007-12-15 13:13:59 +00:00
parent a4471700b0
commit a39977c8d5
2 changed files with 11 additions and 5 deletions

View File

@ -753,6 +753,7 @@ msg.err.unsupported.command = The server does not support the ``%S'' command.
msg.err.invalid.mode = The mode string you entered (``%S'') is invalid. A valid mode string consists of one or more sequences of a + or - followed by one or more alphabetical characters.
msg.err.away.save = Saving the list of away messages failed (%S).
msg.err.invalid.url = ``%S'' is not a valid url nor an alias for a url, and therefor could not be loaded.
msg.err.no.channel = When running the ``%S'' command, you should either provide a channel name, or run the command in the context of a channel.
# Specific bug messages.
msg.bug318419.warning = ChatZilla has detected a potential abnormality in its internal data. You will not be able to send any form of communication at this time, although it might appear you can. The most likely cause is Mozilla Bug 318419 <https://bugzilla.mozilla.org/show_bug.cgi?id=318419>. You are strongly advised to restart the host application (&brandShortName;) to prevent further problems.

View File

@ -3102,11 +3102,7 @@ function cmdInvite(e)
{
var channel;
if (!e.channelName)
{
channel = e.channel;
}
else
if (e.channelName)
{
channel = e.server.getChannel(e.channelName);
if (!channel)
@ -3115,6 +3111,15 @@ function cmdInvite(e)
return;
}
}
else if (e.channel)
{
channel = e.channel;
}
else
{
display(getMsg(MSG_ERR_NO_CHANNEL, e.command.name), MT_ERROR);
return;
}
channel.invite(e.nickname);
}