Bug 842183 - Land in comm-central Instantbird's changes to chat/ - 5 - Bio 1810 - Fix erroneous nickname error message when nick contains spaces, r=clokep.
authoraleth <aleth@instantbird.org>
Thu, 06 Dec 2012 00:17:20 +0100
changeset 11988 a485682a438c1c03d5736e4423b382d46829a9e3
parent 11987 1801dbd51304d3ce504a00b8ae91dde2271d7e94
child 11989 d7dc2547a5ec931b696715e14b68acdcaf4349dc
push id8909
push userflorian@queze.net
push dateMon, 18 Feb 2013 14:55:18 +0000
treeherdercomm-central@dad38b5c0099 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersclokep
bugs842183
Bug 842183 - Land in comm-central Instantbird's changes to chat/ - 5 - Bio 1810 - Fix erroneous nickname error message when nick contains spaces, r=clokep.
chat/protocols/irc/ircBase.jsm
--- a/chat/protocols/irc/ircBase.jsm
+++ b/chat/protocols/irc/ircBase.jsm
@@ -1170,22 +1170,22 @@ var ircBase = {
     },
     "431": function(aMessage) { // ERR_NONICKNAMEGIVEN
       // :No nickname given
       // TODO
       return false;
     },
     "432": function(aMessage) { // ERR_ERRONEUSNICKNAME
       // <nick> :Erroneous nickname
-      let msg = _("error.erroneousNickname", aMessage.params[1]);
+      let msg = _("error.erroneousNickname", this._requestedNickname);
       serverErrorMessage(this, aMessage, msg);
       if (this._requestedNickname == this._accountNickname) {
         // The account has been set up with an illegal nickname.
-        this.ERROR("Erroneous nickname " + aMessage.params[1] + ": " +
-                   aMessage.params[2]);
+        this.ERROR("Erroneous nickname " + this._requestedNickname + ": " +
+                   aMessage.params.slice(1).join(" "));
         this.gotDisconnected(Ci.prplIAccount.ERROR_INVALID_USERNAME, msg);
       }
       else {
         // Reset original nickname to the account nickname in case of
         // later reconnections.
         this._requestedNickname = this._accountNickname;
       }
       return true;