Patrick Cloke avatar Patrick Cloke committed 3dd52b0

Commit for backup.

Comments (0)

Files changed (10)

+# HG changeset patch
+# Parent f5e32e5cfcec2cd66d77ca0c01a40d4c598a527c
+
+diff --git a/chat/protocols/irc/Makefile.in b/chat/protocols/irc/Makefile.in
+--- a/chat/protocols/irc/Makefile.in
++++ b/chat/protocols/irc/Makefile.in
+@@ -16,12 +16,14 @@ EXTRA_COMPONENTS = \
+ 
+ EXTRA_JS_MODULES = \
+ 		ircBase.jsm \
++		ircCAP.jsm \
+ 		ircCommands.jsm \
+ 		ircCTCP.jsm \
+ 		ircDCC.jsm \
+ 		ircHandlers.jsm \
+ 		ircISUPPORT.jsm \
+ 		ircNonStandard.jsm \
++		ircSASL.jsm \
+ 		ircServices.jsm \
+ 		ircUtils.jsm \
+ 		ircWatchMonitor.jsm \
+diff --git a/chat/protocols/irc/README b/chat/protocols/irc/README
+--- a/chat/protocols/irc/README
++++ b/chat/protocols/irc/README
+@@ -78,7 +78,7 @@ Extension Negotiation:
+ Authentication:
+   SASL authentication (PLAIN and BLOWFISH)
+     http://hg.atheme.org/atheme/raw-file/tip/doc/SASL
+-      Note: amlsbGVzAGppbGxlcwBzZXNhbWU= is base64 encoded jillesjillessesame
++      Note: amlsbGVzAGppbGxlcwBzZXNhbWU= is base64 encoded jilles\0jilles\0sesame
+     Depends on IRC Capabilities
+     Simple Authentication and Security Layer (SASL)
+       http://tools.ietf.org/html/rfc2222 (obsolete)
+diff --git a/chat/protocols/irc/irc.js b/chat/protocols/irc/irc.js
+--- a/chat/protocols/irc/irc.js
++++ b/chat/protocols/irc/irc.js
+@@ -1108,11 +1108,14 @@ ircAccount.prototype = {
+ 
+   // Implement section 3.1 of RFC 2812
+   _connectionRegistration: function() {
++    // Send the Client Capabilities list command.
++    this.sendMessage("CAP", "LS");
++
+     // Send the password message, if provided (section 3.1.1).
+-    if (this.imAccount.password) {
++    /*if (this.imAccount.password) {
+       this.sendMessage("PASS", this.imAccount.password,
+                        "PASS <password not logged>");
+-    }
++    }*/
+     // Send the nick message (section 3.1.2).
+     this.sendMessage("NICK", this._requestedNickname);
+ 
+@@ -1197,17 +1200,20 @@ function ircProtocol() {
+   let tempScope = {};
+   Cu.import("resource:///modules/ircBase.jsm", tempScope);
+   Cu.import("resource:///modules/ircISUPPORT.jsm", tempScope);
++  Cu.import("resource:///modules/ircCAP.jsm", tempScope);
+   Cu.import("resource:///modules/ircCTCP.jsm", tempScope);
+   Cu.import("resource:///modules/ircDCC.jsm", tempScope);
+   Cu.import("resource:///modules/ircServices.jsm", tempScope);
+ 
+   // Extra features.
+   Cu.import("resource:///modules/ircNonStandard.jsm", tempScope);
++  Cu.import("resource:///modules/ircSASL.jsm", tempScope);
+   Cu.import("resource:///modules/ircWatchMonitor.jsm", tempScope);
+ 
+   // Register default IRC handlers (IRC base, CTCP).
+   ircHandlers.registerHandler(tempScope.ircBase);
+   ircHandlers.registerHandler(tempScope.ircISUPPORT);
++  ircHandlers.registerHandler(tempScope.ircCAP);
+   ircHandlers.registerHandler(tempScope.ircCTCP);
+   ircHandlers.registerHandler(tempScope.ircServices);
+   // Register default ISUPPORT handler (ISUPPORT base).
+@@ -1224,6 +1230,8 @@ function ircProtocol() {
+   ircHandlers.registerISUPPORTHandler(tempScope.isupportWATCH);
+   ircHandlers.registerHandler(tempScope.ircMONITOR);
+   ircHandlers.registerISUPPORTHandler(tempScope.isupportMONITOR);
++  ircHandlers.registerHandler(tempScope.ircSASL);
++  ircHandlers.registerCAPHandler(tempScope.capSASL);
+ }
+ ircProtocol.prototype = {
+   __proto__: GenericProtocolPrototype,
+diff --git a/chat/protocols/irc/ircBase.jsm b/chat/protocols/irc/ircBase.jsm
+--- a/chat/protocols/irc/ircBase.jsm
++++ b/chat/protocols/irc/ircBase.jsm
+@@ -1186,6 +1186,9 @@ var ircBase = {
+     },
+     "451": function(aMessage) { // ERR_NOTREGISTERED
+       // :You have not registered
++      // If the server doesn't understand CAP it might return this error.
++      if (aMessage.params[0] == "CAP")
++        return true;
+       // TODO
+       return false;
+     },
+diff --git a/chat/protocols/irc/ircCAP.jsm b/chat/protocols/irc/ircCAP.jsm
+new file mode 100644
+--- /dev/null
++++ b/chat/protocols/irc/ircCAP.jsm
+@@ -0,0 +1,80 @@
++/* This Source Code Form is subject to the terms of the Mozilla Public
++ * License, v. 2.0. If a copy of the MPL was not distributed with this
++ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
++
++/*
++ * This implements the IRC Client Capabilities sub-protocol.
++ *   Client Capab Proposal
++ *     http://www.leeh.co.uk/ircd/client-cap.txt
++ *   RFC Drafts: IRC Client Capabilities
++ *     http://tools.ietf.org/html/draft-baudis-irc-capab-00
++ *     http://tools.ietf.org/html/draft-mitchell-irc-capabilities-01
++ *
++ * Note that this doesn't include any implementation as these RFCs do not even
++ * include example parameters.
++ */
++
++const EXPORTED_SYMBOLS = ["ircCAP"];
++
++const Cu = Components.utils;
++
++Cu.import("resource:///modules/ircHandlers.jsm");
++Cu.import("resource:///modules/ircUtils.jsm");
++
++/*
++ * Parses a CAP message of the form:
++ *   CAP <subcommand> [<parameters>]
++ * The cap field is added to the message and it has the following fields:
++ *   subcommand
++ *   parameters A list of capabilities.
++ */
++// This matches a modifier, followed by the name spaces (network specific or
++// standardized), followed by the capability name.
++const capParameterExp = /^([\-=~])?((?:(?:[A-Z][A-Z0-9\-]*\.)*[A-Z][A-Z0-9\-]*\/)?[A-Z][A-Z0-9\-]*)$/i;
++function capMessage(aMessage) {
++  // Some servers send
++  let parameters = aMessage.params.slice(-1)[0].trim().split(" ");
++  aMessage.cap = {
++    subcommand: aMessage.params[aMessage.params.length == 3 ? 1 : 0]
++  };
++
++  return parameters.map(function(aParameter) {
++    // Clone the original object.
++    let message = JSON.parse(JSON.stringify(aMessage));
++    let matches = aParameter.match(capParameterExp);
++
++    message.cap.modifier = matches[1];
++    // The names are case insensitive, arbitrarily choose lowercase.
++    message.cap.parameter = matches[2].toLowerCase();
++    message.cap.disable = matches[1] == "-";
++    message.cap.sticky = matches[1] == "=";
++    message.cap.ack = matches[1] == "~";
++
++    return message;
++  });
++}
++
++var ircCAP = {
++  name: "Client Capabilities",
++  // Slightly above default RFC 2812 priority.
++  priority: ircHandlers.DEFAULT_PRIORITY + 10,
++  isEnabled: function() true,
++
++  commands: {
++    "CAP": function(aMessage) {
++      // [* | <nick>] <subcommand> :<parameters>
++      let messages = capMessage(aMessage);
++      ERROR(JSON.stringify(messages));
++
++      let handled = true;
++      for each (let message in messages)
++        handled &= ircHandlers.handleCAPMessage(this, message);
++      return handled;
++    },
++
++    "410": function(aMessage) { // ERR_INVALIDCAPCMD
++      // <unrecognized subcommand> :Invalid CAP subcommand
++      return false;
++    }
++  }
++};
+diff --git a/chat/protocols/irc/ircHandlers.jsm b/chat/protocols/irc/ircHandlers.jsm
+--- a/chat/protocols/irc/ircHandlers.jsm
++++ b/chat/protocols/irc/ircHandlers.jsm
+@@ -27,6 +27,9 @@ var ircHandlers = {
+   // Object to hold the ISUPPORT handlers, expects the same fields as
+   // _ircHandlers.
+   _isupportHandlers: [],
++  // Object to hold the Client Capabilities handlers, expects the same fields as
++  // _ircHandlers.
++  _capHandlers: [],
+   // Object to hold the CTCP handlers, expects the same fields as _ircHandlers.
+   _ctcpHandlers: [],
+   // Object to hold the DCC handlers, expects the same fields as _ircHandlers.
+@@ -65,6 +68,11 @@ var ircHandlers = {
+   unregisterISUPPORTHandler: function(aHandler)
+     this._unregisterHandler(this._isupportHandlers, aHandler),
+ 
++  registerCAPHandler: function(aHandler)
++    this._registerHandler(this._capHandlers, aHandler),
++  unregisterCAPHandler: function(aHandler)
++    this._unregisterHandler(this._capHandlers, aHandler),
++
+   registerCTCPHandler: function(aHandler)
+     this._registerHandler(this._ctcpHandlers, aHandler),
+   unregisterCTCPHandler: function(aHandler)
+@@ -114,6 +122,10 @@ var ircHandlers = {
+     this._handleMessage(this._isupportHandlers, aAccount, aMessage,
+                         aMessage.isupport.parameter),
+ 
++  handleCAPMessage: function(aAccount, aMessage)
++    this._handleMessage(this._capHandlers, aAccount, aMessage,
++                        aMessage.cap.parameter),
++
+   // aMessage is a CTCP Message, which inherits from an IRC Message.
+   handleCTCPMessage: function(aAccount, aMessage)
+     this._handleMessage(this._ctcpHandlers, aAccount, aMessage,
+@@ -132,6 +144,7 @@ var ircHandlers = {
+   // Checking if handlers exist.
+   get hasHandlers() this._ircHandlers.length > 0,
+   get hasISUPPORTHandlers() this._isupportHandlers.length > 0,
++  get hasCAPHandlers() this._capHandlers.length > 0,
+   get hasCTCPHandlers() this._ctcpHandlers.length > 0,
+   get hasDCCHandlers() this._dccHandlers.length > 0,
+   get hasServicesHandlers() this._servicesHandlers.length > 0,
+diff --git a/chat/protocols/irc/ircSASL.jsm b/chat/protocols/irc/ircSASL.jsm
+new file mode 100644
+--- /dev/null
++++ b/chat/protocols/irc/ircSASL.jsm
+@@ -0,0 +1,84 @@
++/* This Source Code Form is subject to the terms of the Mozilla Public
++ * License, v. 2.0. If a copy of the MPL was not distributed with this
++ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
++
++/*
++ * This implements SASL for IRC.
++ *   http://hg.atheme.org/atheme/raw-file/tip/doc/SASL
++ */
++
++const EXPORTED_SYMBOLS = ["ircSASL", "capSASL"];
++
++const Cu = Components.utils;
++
++Cu.import("resource:///modules/ircHandlers.jsm");
++Cu.import("resource:///modules/ircUtils.jsm");
++
++var ircSASL = {
++  name: "SASL AUTHENTICATE",
++  priority: ircHandlers.DEFAULT_PRIORITY,
++  isEnabled: function() true,
++
++  commands: {
++    "AUTHENTICATE": function(aMessage) {
++      // An authentication identity, authorization identity and password are
++      // used, separated by null.
++      let data = [this._requestedNickname, this._requestedNickname,
++                  this.imAccount.password].join("\0");
++      ERROR(data);
++      this.sendMessage("AUTHENTICATE", btoa(data));
++
++      return aMessage.params[0] == "+";
++    },
++
++    "900": function(aMessage) {
++      // TODO
++      this.sendMessage("CAP", "END");
++      return true;
++    },
++
++    "903": function(aMessage) {
++      // TODO
++    },
++
++    "904": function(aMessage) {
++      // TODO
++    },
++
++    "905": function(aMessage) {
++      // TODO
++    },
++
++    "906": function(aMessage) {
++      // TODO
++    },
++
++    "907": function(aMessage) {
++      // TODO
++    }
++  }
++};
++
++var capSASL = {
++  name: "SASL CAP",
++  priority: ircHandlers.DEFAULT_PRIORITY,
++  isEnabled: function() true,
++
++  commands: {
++    "sasl": function(aMessage) {
++      ERROR("HERE");
++      if (aMessage.cap.subcommand == "LS" && this.imAccount.password) {
++        // If it supports SASL, let the server know we're requiring SASL.
++        this.sendMessage("CAP", ["REQ", "sasl"]);
++        return true;
++      } else if (aMessage.cap.subcommand == "ACK") {
++        // The server acknowledges our choice to use SASL, send the first
++        // message.
++        this.sendMessage("AUTHENTICATE", "PLAIN");
++        return true;
++      }
++
++      return false;
++    }
++  }
++};

irc-creation-time

-# HG changeset patch
-# Parent fc17a60020a6abe9a6de181a4873f105e38e1456
-Bug 1552 - Handle 329: RPL_CREATIONTIME.
-
-diff --git a/chat/protocols/irc/ircNonStandard.jsm b/chat/protocols/irc/ircNonStandard.jsm
---- a/chat/protocols/irc/ircNonStandard.jsm
-+++ b/chat/protocols/irc/ircNonStandard.jsm
-@@ -48,6 +48,11 @@ var ircNonStandard = {
-       return false;
-     },
- 
-+    "329": function(aMessage) { // RPL_CREATIONTIME (Bahamut & Unreal)
-+      // <channel> <creation time>
-+      return true;
-+    },
-+
-     "378": function(aMessage) { // RPL_WHOISHOST (Unreal & Charybdis)
-       // <nick> :is connecting from <host> <ip>
-       let [host, ip] = aMessage.params[2].split(" ").slice(-2);
+# HG changeset patch
+# Parent cd7f86bbe0d796dfc1374f4e7e621c53377adfb2
+diff --git a/chat/protocols/irc/ircISUPPORT.jsm b/chat/protocols/irc/ircISUPPORT.jsm
+--- a/chat/protocols/irc/ircISUPPORT.jsm
++++ b/chat/protocols/irc/ircISUPPORT.jsm
+@@ -20,7 +20,7 @@ Cu.import("resource:///modules/ircHandle
+ Cu.import("resource:///modules/ircUtils.jsm");
+ 
+ /*
+- * Parses a individual token from a ISUPPORT message of the form:
++ * Parses an ircMessage into an ISUPPORT message for each token of the form:
+  *   <parameter>=<value> or -<value>
+  * The isupport field is added to the message and it has the following fields:
+  *   parameter  What is being configured by this ISUPPORT token.
+@@ -29,14 +29,19 @@ Cu.import("resource:///modules/ircUtils.
+  *   value      The new value for the parameter.
+  */
+ function isupportMessage(aMessage, aToken) {
++  // Seperate the ISUPPORT parameters.
++  let tokens = aMessage.params.slice(1, -1);
++
+   let message = aMessage;
+   message.isupport = {};
+-  message.isupport.useDefault = aToken[0] == "-";
+ 
+-  let token = message.isupport.useDefault ? aToken.slice(1) : aToken;
+-  [message.isupport.parameter, message.isupport.value] = token.split("=");
+-
+-  return message;
++  return tokens.map(function(aToken) {
++    let newMessage = message;
++    newMessage.isupport.useDefault = aToken[0] == "-";
++    [newMessage.isupport.parameter, newMessage.isupport.value] =
++      (newMessage.isupport.useDefault ? aToken.slice(1) : aToken).split("=");
++    return newMessage;
++  });
+ }
+ 
+ var ircISUPPORT = {
+@@ -49,17 +54,11 @@ var ircISUPPORT = {
+     // RPL_ISUPPORT
+     // [-]<parameter>[=<value>] :are supported by this server
+     "005": function(aMessage) {
+-      if (!("ISUPPORT" in this))
+-        this.ISUPPORT = {};
+-
+-      // Seperate the ISUPPORT parameters.
+-      let tokens = aMessage.params.slice(1, -1);
++      let messages = isupportMessage(aMessage);
+ 
+       let handled = true;
+-      for each (let token in tokens) {
+-        let message = isupportMessage(aMessage, token);
++      for each (let message in messages)
+         handled &= ircHandlers.handleISUPPORTMessage(this, message);
+-      }
+ 
+       return handled;
+     }

irc-nickserv

-# HG changeset patch
-# User Patrick Cloke <clokep@gmail.com>
-# Date 1338592154 14400
-# Node ID 8c46525da494b7cb9c45bab8f7f50a384599c393
-# Parent 43aa65fd0edf20cd0eae009eca7bcc804a865279
-Bug 1477 - Authenticate with NickServ.
-
-diff --git a/chat/protocols/irc/ircServices.jsm b/chat/protocols/irc/ircServices.jsm
---- a/chat/protocols/irc/ircServices.jsm
-+++ b/chat/protocols/irc/ircServices.jsm
-@@ -8,13 +8,21 @@
-  * with the names NickServ, ChanServ, OperServ and MemoServ; but other services
-  * do exist and are in use.
-  *
-+ * Since the "protocol" behind services is really just text-based, human
-+ * readable messages, attempt to parse them, but always fall back to just
-+ * showing the message to the user if we're unsure what to do.
-+ *
-  * Anope
-  *  http://www.anope.org/docgen/1.8/
-  */
- 
- const EXPORTED_SYMBOLS = ["ircServices", "servicesBase"];
- 
--Components.utils.import("resource:///modules/ircHandlers.jsm");
-+const Cu = Components.utils;
-+
-+Cu.import("resource:///modules/imXPCOMUtils.jsm");
-+Cu.import("resource:///modules/ircHandlers.jsm");
-+Cu.import("resource:///modules/ircUtils.jsm");
- 
- /*
-  * If a service is found, an extra field (serviceName) is added with the
-@@ -69,9 +77,6 @@ var servicesBase = {
-   priority: ircHandlers.DEFAULT_PRIORITY,
-   isEnabled: function() true,
- 
--  // All of the "protocol" behind services is text-based, human readable
--  // messages. We'll do our best to parse them, but if we're unsure...we should
--  // always fall back and let the user see the message!
-   commands: {
-     "ChanServ": function(aMessage) {
-       // [<channel name>] <message>
-@@ -95,6 +100,60 @@ var servicesBase = {
-       this.getConversation(channel)
-           .writeMessage(aMessage.nickname, message, params);
-       return true;
-+    },
-+
-+    "NickServ": function(aMessage) {
-+      let text = aMessage.params[1];
-+
-+      // Since we feed the messages back through the system at the end of the
-+      // timeout when waiting for a log-in, we need to NOT try to handle them
-+      // here and let them fall through to the default handler.
-+      if (this.didNotReceivePassCommand)
-+        return false;
-+
-+      // After receiving a log-in prompt, queue any other messages that occur
-+      // during the timeout so they appear in order.
-+      if (this.nickservMessageQueue) {
-+        this.nickservMessageQueue.push(aMessage);
-+        return true;
-+      }
-+
-+      // NickServ wants us to identify.
-+      if (text == "This nick is owned by someone else.  Please choose another." || // Anope.
-+          text == "This nickname is registered. Please choose a different nickname, or identify via \x02/msg NickServ identify <password>\x02.") { // Atheme.
-+        // This is the first time we've seen this authentication request.
-+        LOG("Authentication requested by NickServ.");
-+
-+        // Wait one second before showing the message to the user (giving the
-+        // the server time to process the PASS command).
-+        this.nickservMessageQueue = [aMessage];
-+        this.nickservAuthTimeout =
-+          setTimeout(function() {
-+            this.didNotReceivePassCommand = true;
-+            this.nickservMessageQueue.every(function(aMessage)
-+              ircHandlers.handleMessage(this, aMessage), this);
-+            delete this.didNotReceivePassCommand;
-+          }.bind(this), 1000);
-+        return true;
-+      }
-+
-+      // Password successfully accepted by NickServ.
-+      if (text == "Password accepted - you are now recognized." || // Anope.
-+          text == "You are now identified for \x02" + aMessage.params[0] + "\x02.") { // Atheme.
-+        LOG("Successfully authenticated with NickServ.");
-+        // If we're waiting for an authentication (and have a queue of messages
-+        // waiting), then the PASS command succeeded and we don't need to
-+        // display those messages.
-+        if (this.nickservMessageQueue) {
-+          clearTimeout(this.nickservAuthTimeout);
-+          delete this.nickservAuthTimeout;
-+          delete this.nickservMessageQueue;
-+
-+          return true;
-+        }
-+      }
-+
-+      return false;
-     }
-   }
- };
+# HG changeset patch
+# Parent cd7f86bbe0d796dfc1374f4e7e621c53377adfb2
+Bug 1561 - Remove libpurple's pretentious /wallops help message.
+
+diff --git a/chat/locales/en-US/irc.properties b/chat/locales/en-US/irc.properties
+--- a/chat/locales/en-US/irc.properties
++++ b/chat/locales/en-US/irc.properties
+@@ -69,7 +69,6 @@ command.topic=%S [&lt;new topic&gt;]: Se
+ 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.
+ 
+ # LOCALIZATION NOTE (message.*):
+diff --git a/chat/protocols/irc/ircCommands.jsm b/chat/protocols/irc/ircCommands.jsm
+--- a/chat/protocols/irc/ircCommands.jsm
++++ b/chat/protocols/irc/ircCommands.jsm
+@@ -273,11 +273,6 @@ var commands = [
+     run: function(aMsg, aConv) setMode(aMsg, aConv, "o", true)
+   },
+   {
+-    name: "operwall",
+-    get helpString() _("command.wallops", "operwall"),
+-    run: function(aMsg, aConv) simpleCommand(aConv, "WALLOPS", aMsg)
+-  },
+-  {
+     name: "operserv",
+     get helpString() _("command.operserv", "operserv"),
+     run: function(aMsg, aConv) privateMessage(aConv, aMsg, "OperServ")
+@@ -353,11 +348,6 @@ var commands = [
+     run: function(aMsg, aConv) setMode(aMsg, aConv, "v", true)
+   },
+   {
+-    name: "wallops",
+-    get helpString() _("command.wallops", "wallops"),
+-    run: function(aMsg, aConv) simpleCommand(aConv, "WALLOPS", aMsg)
+-  },
+-  {
+     name: "whois",
+     get helpString() _("command.whois", "whois"),
+     run: function(aMsg, aConv) {

irc-whowas

-# HG changeset patch
-# Parent 790a777461e1ef57ef475b082932115a713d7906
-Bug 1551 - Remove whowas command, duplicate of whois, r=aleth.
-
-diff --git a/chat/locales/en-US/irc.properties b/chat/locales/en-US/irc.properties
---- a/chat/locales/en-US/irc.properties
-+++ b/chat/locales/en-US/irc.properties
-@@ -71,7 +71,6 @@ command.version=%S &lt;nick&gt;: Request
- 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.
-diff --git a/chat/protocols/irc/ircCommands.jsm b/chat/protocols/irc/ircCommands.jsm
---- a/chat/protocols/irc/ircCommands.jsm
-+++ b/chat/protocols/irc/ircCommands.jsm
-@@ -108,14 +108,6 @@ function ctcpCommand(aConv, aTarget, aCo
-   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",
-@@ -360,13 +352,13 @@ var commands = [
-   {
-     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;
-+    }
-   }
- ];
+# HG changeset patch
+# Parent b5506fb1876385621348c1312c805e586d4fdead
+diff --git a/instantbird/app/Makefile.in b/instantbird/app/Makefile.in
+--- a/instantbird/app/Makefile.in
++++ b/instantbird/app/Makefile.in
+@@ -15,16 +15,17 @@ GRE_MILESTONE = $(shell $(PYTHON) $(MOZI
+ GRE_BUILDID = $(shell $(PYTHON) $(MOZILLA_SRCDIR)/config/printconfigsetting.py $(LIBXUL_DIST)/bin/platform.ini Build BuildID)
+ 
+ PLATFORM_LICENSE_FILE = $(MOZILLA_SRCDIR)/toolkit/content/license.html
+-MAIL_LICENSE_HTML_FILE = ../license.html
+ MAIL_LICENSE_TXT_FILE = $(topsrcdir)/instantbird/LICENSE.txt
+-MAIL_APP_LICENSE_FILE = $(srcdir)/app-license.html
++APP_LICENSE_FILE = $(srcdir)/app-license.html
++
++CHROME_DEPS += $(srcdir)/app-license.html
+ 
+ DEFINES += \
+   -DINSTANTBIRD_ICO=\"$(DIST)/branding/instantbird.ico\" \
+   -DAB_CD=$(AB_CD) \
+   -DGRE_MILESTONE=$(GRE_MILESTONE) \
+   -DGRE_BUILDID=$(GRE_BUILDID) \
+-  -DAPP_LICENSE_BLOCK=$(MAIL_APP_LICENSE_FILE) \
++  -DAPP_LICENSE_BLOCK=$(srcdir)/app-license.html \
+    $(NULL)
+ 
+ MOZ_SOURCE_STAMP = $(firstword $(shell hg -R $(topsrcdir) parent --template="{node|short}\n" 2>/dev/null))
+@@ -44,7 +45,6 @@ endif
+ DIRS		= profile
+ 
+ GARBAGE += \
+-	$(MAIL_LICENSE_HTML_FILE) \
+ 	$(FINAL_TARGET)/license.html \
+ 	$(NULL)
+ 
+@@ -282,12 +282,7 @@ ifeq ($(MOZ_WIDGET_TOOLKIT),photon)
+ LIBS += -lphexlib
+ endif
+ 
+-$(MAIL_LICENSE_HTML_FILE): $(PLATFORM_LICENSE_FILE) $(MAIL_APP_LICENSE_FILE)
+-	$(PYTHON) $(MOZILLA_DIR)/config/Preprocessor.py $(DEFINES) $< | \
+-	sed -e "s/about:license\#/\#/" | \
+-	sed -e "s/available under one/available under a subset of it or one/" > $@
+-
+-libs:: $(MAIL_LICENSE_TXT_FILE) $(MAIL_LICENSE_HTML_FILE)
++libs:: $(MAIL_LICENSE_TXT_FILE)
+ ifeq ($(OS_ARCH),WINNT)
+ 	$(EXIT_ON_ERROR) \
+ 	for file in $^; do \
+diff --git a/instantbird/content/credits.xhtml b/instantbird/content/credits.xhtml
+--- a/instantbird/content/credits.xhtml
++++ b/instantbird/content/credits.xhtml
+@@ -173,19 +173,6 @@
+         aEvent.preventDefault();
+       }
+ 
+-      function openLicense(aEvent)
+-      {
+-        var fileLocator =
+-            Components.classes["@mozilla.org/file/directory_service;1"].
+-            getService(Components.interfaces.nsIProperties);
+-        var appDir = fileLocator.get("XCurProcD", Components.interfaces.nsIFile);
+-        appDir.append("license.html");
+-        var ioService = Components.classes["@mozilla.org/network/io-service;1"].
+-                        getService(Components.interfaces.nsIIOService);
+-        loadExternalURI(ioService.newFileURI(appDir));
+-        aEvent.preventDefault();
+-      }
+-
+     ]]>
+     </script>
+   </head>
+@@ -235,7 +222,7 @@
+           &brandFullName; &license.part0; &copy;2007-2012 &license.part1;
+           <a href="http://www.instantbird.com/thanks.html" onclick="openContributors(event);">&license.contrib;</a>,
+           &license.part2;
+-          <a href="" onclick="openLicense(event);">&credit.license;</a>
++          <a onclick="openDialog('about:license');">&credit.license;</a>
+           &license.part3;</p>
+ 
+     </div>
+@@ -245,4 +232,3 @@
+     </div>
+   </body>
+ </html>
+-
+diff --git a/tools/patches/license.patch b/tools/patches/license.patch
+new file mode 100644
+--- /dev/null
++++ b/tools/patches/license.patch
+@@ -0,0 +1,87 @@
++diff --git a/toolkit/content/license.html b/toolkit/content/license.html
++--- a/toolkit/content/license.html
+++++ b/toolkit/content/license.html
++@@ -41,29 +41,30 @@
++       <li><a href="about:license#mpl">Mozilla Public License 2.0</a>
++       <ul>
++         <li><a href="http://www.mozilla.org/MPL/2.0/FAQ.html">MPL 2.0 FAQ</a></li>
++       </ul>
++       </li>
++     </ul>
++     
++     <p>The remainder of the software which is not under the MPL is available
++-       under one of
+++       under a subset of it or one of
++        a variety of other licenses. Those that require reproduction 
++        of the license text in the distribution are given below. 
++        (Note: your copy of this product may not contain code covered by one 
++        or more of the licenses listed here, depending on the exact product 
++        and version you choose.)
++     </p>
++     
++     <ul>
++       <li><a href="about:license#android">Android Open Source License</a></li>
++       <li><a href="about:license#angle">ANGLE License</a></li>
++       <li><a href="about:license#apache">Apache License 2.0</a></li>
++       <li><a href="about:license#apple">Apple License</a></li>
+++      <li><a href="about:license#apple-bonjour">Apple Bonjour License</a></li>
++       <li><a href="about:license#apple-mozilla">Apple/Mozilla NPRuntime License</a></li>
++       <li><a href="about:license#apple-torch">Apple/Torch Mobile License</a></li>
++       <li><a href="about:license#breakpad">Breakpad License</a></li>
++       <li><a href="about:license#bspatch">bspatch License</a></li>
++       <li><a href="about:license#cairo">Cairo Component Licenses</a></li>
++       <li><a href="about:license#chromium">Chromium License</a></li>
++       <li><a href="about:license#hunspell-nl">Dutch Spellchecking Dictionary License</a></li>
++       <li><a href="about:license#edl">Eclipse Distribution License</a></li>
++@@ -852,16 +853,51 @@ PROFITS; OR BUSINESS INTERRUPTION) HOWEV
++ OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
++ (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
++ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
++ </pre>
++ 
++     
++     <hr>
++ 
+++    <h1><a id="apple-bonjour"></a>Apple Bonjour License</h1>
+++
+++    <p>This license applies to the file
+++    <span class="path">purple/libpurple/protocols/bonjour/win32/dns_sd.h</span>.</p>
+++
+++<pre>
+++Copyright (&copy;) 2003-2004, Apple Computer, Inc. All rights reserved.
+++
+++Redistribution and use in source and binary forms, with or without
+++modification, are permitted provided that the following conditions are met:
+++
+++1.  Redistributions of source code must retain the above copyright notice,
+++    this list of conditions and the following disclaimer.
+++2.  Redistributions in binary form must reproduce the above copyright notice,
+++    this list of conditions and the following disclaimer in the documentation
+++    and/or other materials provided with the distribution.
+++3.  Neither the name of Apple Computer, Inc. ("Apple") nor the names of its
+++    contributors may be used to endorse or promote products derived from this
+++    software without specific prior written permission.
+++
+++THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY
+++EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+++WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+++DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY
+++DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+++(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+++LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+++ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+++(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+++SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+++</pre>
+++
+++
+++    <hr>
+++
++     <h1><a id="apple-mozilla"></a>Apple/Mozilla NPRuntime License</h1>
++ 
++     <p>This license applies to the file
++     <span class="path">dom/plugins/base/npruntime.h</span>.</p>
++ 
++ <pre>
++ Copyright &copy; 2004, Apple Computer, Inc. and The Mozilla Foundation. 
++ All rights reserved.
+# HG changeset patch
+# Parent b5506fb1876385621348c1312c805e586d4fdead
+Bug 1477 - Handle NickServ messages follow up for more cases, r=aleth.
+
+diff --git a/chat/protocols/irc/ircServices.jsm b/chat/protocols/irc/ircServices.jsm
+--- a/chat/protocols/irc/ircServices.jsm
++++ b/chat/protocols/irc/ircServices.jsm
+@@ -114,7 +114,7 @@ var servicesBase = {
+       // If we have a queue of messages, we're waiting for authentication.
+       if (this.nickservMessageQueue) {
+         if (text == "Password accepted - you are now recognized." || // Anope.
+-          text == "You are now identified for \x02" + aMessage.params[0] + "\x02.") { // Atheme.
++            text == "You are now identified for \x02" + aMessage.params[0] + "\x02.") { // Atheme.
+           // Password successfully accepted by NickServ, don't display the
+           // queued messages.
+           LOG("Successfully authenticated with NickServ.");
+@@ -132,6 +132,7 @@ var servicesBase = {
+ 
+       // NickServ wants us to identify.
+       if (text == "This nick is owned by someone else.  Please choose another." || // Anope.
++          text == "This nickname is registered and protected.  If it is your" || // Anope (SECURE enabled).
+           text == "This nickname is registered. Please choose a different nickname, or identify via \x02/msg NickServ identify <password>\x02.") { // Atheme.
+         LOG("Authentication requested by NickServ.");
+ 

pkg-config

-# HG changeset patch
-# Parent df7d4ff978c74bf486ab115e87db56985bcd954b
-Bug 1542 - Use pkg-config instead of hard coded paths.
-
-diff --git a/config/autoconf.mk.in b/config/autoconf.mk.in
---- a/config/autoconf.mk.in
-+++ b/config/autoconf.mk.in
-@@ -423,6 +423,12 @@ GLIB_CFLAGS	= @GLIB_CFLAGS@
- GLIB_LIBS	= @GLIB_LIBS@
- GLIB_GMODULE_LIBS	= @GLIB_GMODULE_LIBS@
- 
-+LIBXML2_CFLAGS	= @LIBXML2_CFLAGS@
-+LIBXML2_LIBS	= @LIBXML2_LIBS@
-+
-+AVAHI_CFLAGS	= @AVAHI_CFLAGS@
-+AVAHI_LIBS	= @AVAHI_LIBS@
-+
- MOZ_NATIVE_MAKEDEPEND	= @SYSTEM_MAKEDEPEND@
- 
- MOZ_AUTO_DEPS	= @MOZ_AUTO_DEPS@
-diff --git a/configure.in b/configure.in
---- a/configure.in
-+++ b/configure.in
-@@ -6488,6 +6488,16 @@ dnl = Libpurple related checks
- dnl =
- dnl ========================================================
- 
-+dnl ========================================================
-+dnl Check for libxml2.
-+dnl ========================================================
-+if test "${OS_TARGET}" = "Linux"; then
-+    PKG_CHECK_MODULES(LIBXML2, libxml-2.0)
-+
-+    AC_SUBST(LIBXML2_CFLAGS)
-+    AC_SUBST(LIBXML2_LIBS)
-+fi
-+
- _SAVE_LIBS="$LIBS"
- LIBS=
- 
-@@ -6566,6 +6576,8 @@ if test "$PURPLE_BONJOUR"; then
-             if test -z "$PURPLE_AVAHI"; then
-                 AC_MSG_ERROR([Could not find avahi-client or avahi-glib. To build without Bonjour, reconfigure with --disable-bonjour.])
-             fi
-+            AC_SUBST(AVAHI_CFLAGS)
-+            AC_SUBST(AVAHI_LIBS)
-             ;;
-     esac
- fi
-diff --git a/purple/libpurple/Makefile.in b/purple/libpurple/Makefile.in
---- a/purple/libpurple/Makefile.in
-+++ b/purple/libpurple/Makefile.in
-@@ -56,7 +56,7 @@ EXTRA_LIBS	= -liconv -lz
- SHARED_LIBRARY_LIBS += $(foreach lib,glib xml2,../libraries/$(lib)/$(LIB_PREFIX)$(lib).$(LIB_SUFFIX))
- else
- # Other Unix
--EXTRA_LIBS	= $(GLIB_LIBS) -lgmodule-2.0 -lxml2 -lz
-+EXTRA_LIBS	= $(GLIB_LIBS) $(GLIB_GMODULE_LIBS) $(LIBXML2_LIBS) -lz
- endif
- ifneq ($(OS_ARCH),FreeBSD)
- EXTRA_LIBS	+= -lresolv
-diff --git a/purple/libpurple/protocols/bonjour/Makefile.in b/purple/libpurple/protocols/bonjour/Makefile.in
---- a/purple/libpurple/protocols/bonjour/Makefile.in
-+++ b/purple/libpurple/protocols/bonjour/Makefile.in
-@@ -35,8 +35,8 @@ endif
- else
- # Linux uses libavahi instead of Bonjour.
- CSRCS	+= mdns_avahi.c
--LOCAL_INCLUDES	+= -I/usr/include/libxml2 -I/usr/local/include/libxml2/
--EXTRA_LIBS	+= @AVAHI_LIBS@
-+LOCAL_INCLUDES	+= $(LIBXML2_CFLAGS) $(AVAHI_CFLAGS)
-+EXTRA_LIBS	+= $(LIBXML2_LIBS) $(AVAHI_LIBS)
- endif
- 
- include $(srcdir)/../prpl-rules.mk
-diff --git a/purple/libpurple/protocols/jabber/Makefile.in b/purple/libpurple/protocols/jabber/Makefile.in
---- a/purple/libpurple/protocols/jabber/Makefile.in
-+++ b/purple/libpurple/protocols/jabber/Makefile.in
-@@ -10,10 +10,8 @@ PROTOCOL	= jabber
- 
- include $(srcdir)/../prpl.mk
- 
--ifneq (,$(filter-out WINNT Darwin,$(OS_ARCH)))
--LOCAL_INCLUDES	+= -I/usr/include/libxml2/ -I/usr/local/include/libxml2/
--else
--REQUIRES	+= libxml2
-+ifeq (,$(filter WINNT Darwin,$(OS_ARCH)))
-+LOCAL_INCLUDES	+= $(LIBXML2_CFLAGS)
- endif
- 
- CSRCS		= \
-diff --git a/purple/libpurple/protocols/prpl.mk b/purple/libpurple/protocols/prpl.mk
---- a/purple/libpurple/protocols/prpl.mk
-+++ b/purple/libpurple/protocols/prpl.mk
-@@ -19,7 +19,7 @@ LOCAL_INCLUDES = -I$(DIST)/include/libpu
- 
- ifneq (,$(filter-out WINNT WINCE Darwin,$(OS_ARCH)))
- LOCAL_INCLUDES	+= $(GLIB_CFLAGS)
--EXTRA_LIBS	= ../../libpurple.so $(GLIB_LIBS) -lgmodule-2.0 -lxml2 -lz
-+EXTRA_LIBS	= ../../libpurple.so $(GLIB_LIBS) $(GLIB_GMODULE_LIBS) $(LIBXML2_LIBS) -lz
- else
- LOCAL_INCLUDES  += -I$(DIST)/include/glib
- EXTRA_LIBS	= -L../.. -lpurple -L$(DIST)/lib -lz
-diff --git a/purple/makefiles.sh b/purple/makefiles.sh
---- a/purple/makefiles.sh
-+++ b/purple/makefiles.sh
-@@ -8,6 +8,7 @@ purple/locales/Makefile
- purple/libraries/xml2/Makefile
- purple/libraries/glib/Makefile
- purple/libpurple/Makefile
-+purple/libpurple/protocols/bonjour/Makefile
- purple/libpurple/protocols/simple/Makefile
- purple/libpurple/protocols/qq/Makefile
- purple/libpurple/protocols/msn/Makefile
-diff --git a/purple/purplexpcom/src/Makefile.in b/purple/purplexpcom/src/Makefile.in
---- a/purple/purplexpcom/src/Makefile.in
-+++ b/purple/purplexpcom/src/Makefile.in
-@@ -21,7 +21,7 @@ MODULE_NAME	= purplexpcom
- 
- ifneq (,$(filter-out WINNT WINCE Darwin,$(OS_ARCH)))
- LOCAL_INCLUDES	= $(GLIB_CFLAGS)
--EXTRA_LIBS	= $(GLIB_LIBS) -lgmodule-2.0 $(DIST)/lib/libpurple.so -lz -lxml2
-+EXTRA_LIBS	= $(GLIB_LIBS) $(GLIB_GMODULE_LIBS) $(DIST)/lib/libpurple.so -lz $(LIBXML2_LIBS)
- else
- LOCAL_INCLUDES  += -I$(DIST)/include/glib
- EXTRA_LIBS	= -L$(DIST)/lib -lpurple -lz
 kill-xpconnect-assert
 irc-docs
 irc-docs-services
-irc-nickserv
-irc-creation-time
-irc-whowas
+nickserv
+license
+irc-isupport
+irc-cap
+irc-wallops
 irc-minor
 smileys
 normalizedName-fix
 irc-ident
 irc-normalized-chat-name
 qq
-pkg-config
 skype
 sipe
 steam
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.