Bug 1724585 - IRCv3: Add support for account-tag. r=IanN
authorAscrod <32915892+Ascrod@users.noreply.github.com>
Sun, 10 Feb 2019 08:24:44 -0500
changeset 33728 bc48ea2da1ca955fe194efdc1f930e9c2fa54bd5
parent 33727 7f49f5db7b41b4c62f2269a4b222d7152d44a28b
child 33729 acdff8c1a85d3f810d8aa7485c00f961bb40526f
push id19160
push userfrgrahl@gmx.net
push dateFri, 10 Sep 2021 15:43:44 +0000
treeherdercomm-central@001e924e3b76 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersIanN
bugs1724585
Bug 1724585 - IRCv3: Add support for account-tag. r=IanN
suite/chatzilla/js/lib/irc.js
--- a/suite/chatzilla/js/lib/irc.js
+++ b/suite/chatzilla/js/lib/irc.js
@@ -8,17 +8,17 @@ const JSIRC_ERR_NO_SOCKET = "JSIRCE:NS";
 const JSIRC_ERR_EXHAUSTED = "JSIRCE:E";
 const JSIRC_ERR_CANCELLED = "JSIRCE:C";
 const JSIRC_ERR_NO_SECURE = "JSIRCE:NO_SECURE";
 const JSIRC_ERR_OFFLINE   = "JSIRCE:OFFLINE";
 const JSIRC_ERR_PAC_LOADING = "JSIRCE:PAC_LOADING";
 
 const JSIRCV3_SUPPORTED_CAPS = [
     "account-notify",
-    //"account-tag",
+    "account-tag",
     "away-notify",
     //"batch",
     "cap-notify",
     "chghost",
     "echo-message",
     "extended-join",
     "invite-notify",
     //"labeled-response",
@@ -1507,16 +1507,21 @@ function serv_onRawData(e)
             {
                 ary = e.source.match(/([^ ]+)!(.*)/);
                 if (ary)
                     e.user = new CIRCUser(this, null, ary[1], ary[2], null);
             }
         }
     }
 
+    if (("user" in e) && e.user && e.tags.account)
+    {
+        e.user.account = e.tags.account;
+    }
+
     e.ignored = false;
     if (("user" in e) && e.user && ("ignoreList" in this.parent))
     {
         // Assumption: if "ignoreList" is in this.parent, we assume that:
         //   a) it's an array.
         //   b) ignoreMaskCache also exists, and
         //   c) it's an array too.