Bug 842183 - Land in comm-central Instantbird's changes to chat/ - 5 - Bio 1710 - Unhandled IRC message: 335, r=aleth.
authorPatrick Cloke <clokep@gmail.com>
Thu, 17 Jan 2013 20:28:11 -0500
changeset 12003 aee786d836a5636e7e5d3dc0712afc43d506b280
parent 12002 64239df00f64df955f38291234434ee9385bc3b4
child 12004 b871590b5fe81d4cf90b3ed726ea209d05b145ee
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)
reviewersaleth
bugs842183
Bug 842183 - Land in comm-central Instantbird's changes to chat/ - 5 - Bio 1710 - Unhandled IRC message: 335, r=aleth.
chat/locales/en-US/irc.properties
chat/protocols/irc/irc.js
chat/protocols/irc/ircNonStandard.jsm
--- a/chat/locales/en-US/irc.properties
+++ b/chat/locales/en-US/irc.properties
@@ -168,16 +168,17 @@ tooltip.server=Connected to
 #    protect users).
 tooltip.connectedFrom=Connected from
 tooltip.registered=Registered
 tooltip.registeredAs=Registered as
 tooltip.secure=Using a secure connection
 # The away message of the user
 tooltip.away=Away
 tooltip.ircOp=IRC Operator
+tooltip.bot=Bot
 tooltip.idleTime=Idle for
 tooltip.channels=Currently on
 
 #    %1$S is the server name, %2$S is some generic server information (usually a
 #    location or the date the user was last seen).
 tooltip.serverValue=%1$S (%2$S)
 
 # LOCALIZATION NOTE (yes, no):
--- a/chat/protocols/irc/irc.js
+++ b/chat/protocols/irc/irc.js
@@ -888,16 +888,17 @@ ircAccount.prototype = {
       realname: null,
       server: null,
       connectedFrom: null,
       registered: normalizeBool,
       registeredAs: null,
       secure: normalizeBool,
       away: null,
       ircOp: normalizeBool,
+      bot: normalizeBool,
       idleTime: null,
       channels: null
     };
 
     let tooltipInfo = [];
     for (let field in kFields) {
       if (whoisInformation.hasOwnProperty(field) && whoisInformation[field]) {
         let value = whoisInformation[field];
--- a/chat/protocols/irc/ircNonStandard.jsm
+++ b/chat/protocols/irc/ircNonStandard.jsm
@@ -91,16 +91,21 @@ var ircNonStandard = {
         // If the authname differs from the nickname, add it to the WHOIS
         // information; otherwise, ignore it.
         if (this.normalize(nick) != this.normalize(authname))
           this.setWhois(nick, {registeredAs: authname});
       }
       return true;
     },
 
+    "335": function(aMessage) { // RPL_WHOISBOT (Unreal)
+      // <nick> :is a \002Bot\002 on <network>
+      return this.setWhois(aMessage.params[1], {bot: true});
+    },
+
     "378": function(aMessage) { // RPL_WHOISHOST (Unreal & Charybdis)
       // <nick> :is connecting from <host> <ip>
       let [host, ip] = aMessage.params[2].split(" ").slice(-2);
       return this.setWhois(aMessage.params[1], {host: host, ip: ip});
     },
 
     "499": function(aMessage) { // ERR_CHANOWNPRIVNEEDED (Unreal)
       // <channel> :You're not the channel owner (status +q is needed)