Bug 776901 - Land in comm-central Instantbird's changes to chat/ - 2 - Bio 1551 - Remove whowas command, duplicate of whois, r=aleth.
authorPatrick Cloke <clokep@gmail.com>
Tue, 26 Jun 2012 19:41:57 -0400
changeset 13143 ec9e9482fa484b2002f08133aa18fda81d6a3c44
parent 13142 7707118a8069c344db05e4c2a0e7e1fc34277526
child 13144 9bef7c17269c01356ebf6aacc3b031ba021561b8
push idunknown
push userunknown
push dateunknown
reviewersaleth
bugs776901
Bug 776901 - Land in comm-central Instantbird's changes to chat/ - 2 - Bio 1551 - Remove whowas command, duplicate of whois, r=aleth.
chat/locales/en-US/irc.properties
chat/protocols/irc/ircCommands.jsm
--- a/chat/locales/en-US/irc.properties
+++ b/chat/locales/en-US/irc.properties
@@ -66,17 +66,16 @@ command.quit=%S &lt;message&gt;: Disconn
 command.quote=%S &lt;command&gt;: Send a raw command to the server.
 command.time=%S: Displays the current local time at the IRC server.
 command.topic=%S [&lt;new topic&gt;]: Set this channel's topic.
 command.umode=%S (+|-)&lt;new mode&gt;: Set or unset a user mode.
 command.version=%S &lt;nick&gt;: Request the version of a user's client.
 command.voice=%S &lt;nick1&gt;[,&lt;nick2&gt;]*: Grant channel voice status to someone. You must be a channel operator to do this.
 command.wallops=%S &lt;message&gt;: If you don't know what this is, you probably can't use it (sends a command to all connected with the +w flag and all operators on the server.
 command.whois=%S &lt;nick&gt;: Get information on a user.
-command.whowas=%S &lt;nick&gt;: Get information on a user that has logged off.
 
 # LOCALIZATION NOTE (message.*):
 #    These are shown as system messages in the conversation.
 #    %1$S is the nick and %2$S is the nick and host of the user who joined.
 message.join=%1$S [%2$S] entered the room.
 #    %1$S is the nick of who kicked you.
 #    %2$S is message.kicked.reason, if a kick message was given.
 message.kicked.you=You have been kicked by %1$S%2$S.
--- a/chat/protocols/irc/ircCommands.jsm
+++ b/chat/protocols/irc/ircCommands.jsm
@@ -103,24 +103,16 @@ function simpleCommand(aConv, aCommand, 
 function ctcpCommand(aConv, aTarget, aCommand, aMsg) {
   if (!aTarget.length)
     return false;
 
   getAccount(aConv).sendCTCPMessage(aCommand, aMsg, aTarget, false);
   return true;
 }
 
-function whoisCommand(aMsg, aConv) {
-  aMsg = aMsg.trim();
-  if (!aMsg || aMsg.indexOf(" ") != -1)
-    return false;
-  getConv(aConv).requestBuddyInfo(aMsg);
-  return true;
-}
-
 var commands = [
   {
     name: "action",
     get helpString() _("command.action", "action"),
     run: actionCommand
   },
   {
     name: "ctcp",
@@ -363,18 +355,18 @@ var commands = [
   {
     name: "wallops",
     get helpString() _("command.wallops", "wallops"),
     run: function(aMsg, aConv) simpleCommand(aConv, "WALLOPS", aMsg)
   },
   {
     name: "whois",
     get helpString() _("command.whois", "whois"),
-    run: whoisCommand
-  },
-  {
-    name: "whowas",
-    get helpString() _("command.whowas", "whowas"),
-    // We can run whoisCommand here as that will automatically execute whowas
-    // if the nick is offline (and show the nick is actually online if not).
-    run: whoisCommand
+    run: function(aMsg, aConv) {
+      // Note that this will automatically run whowas is the nick is offline.
+      aMsg = aMsg.trim();
+      if (!aMsg || aMsg.indexOf(" ") != -1)
+        return false;
+      getConv(aConv).requestBuddyInfo(aMsg);
+      return true;
+    }
   }
 ];