Add 'twitch.tv/membership' capability for Twitch.tv
authorFlorent Castelli <florent.castelli@gmail.com>
Thu, 22 Jun 2017 16:39:12 +0000 (18:39 +0200)
committerManuel Nickschas <sputnick@quassel-irc.org>
Wed, 20 Dec 2017 00:09:04 +0000 (01:09 +0100)
Twitch.tv implementation doesn't send NAMES list automatically
unless supported by the client as they can be quite big.

See: https://dev.twitch.tv/docs/v5/guides/irc/#twitch-irc-capability-membership

Closes GH-296.

src/common/irccap.h

index c61068e..c3fd5bd 100644 (file)
@@ -106,6 +106,18 @@ namespace IrcCap {
      */
     namespace Vendor {
 
      */
     namespace Vendor {
 
+        /**
+         * Twitch.tv membership message support
+         *
+         * User list in a channel can be quite large and often non required for bot users and is then optional.
+         *
+         * From Twitch.tv documentation:
+         * "Adds membership state event data. By default, we do not send this data to clients without this capability."
+         *
+         * https://dev.twitch.tv/docs/v5/guides/irc/#twitch-irc-capability-membership
+         */
+        const QString TWITCH_MEMBERSHIP = "twitch.tv/membership";
+
         /**
          * Self message support, as recognized by ZNC.
          *
         /**
          * Self message support, as recognized by ZNC.
          *
@@ -131,6 +143,7 @@ namespace IrcCap {
             MULTI_PREFIX,
             SASL,
             USERHOST_IN_NAMES,
             MULTI_PREFIX,
             SASL,
             USERHOST_IN_NAMES,
+            Vendor::TWITCH_MEMBERSHIP,
             Vendor::ZNC_SELF_MESSAGE
     };
     // NOTE: If you modify the knownCaps list, update the constants above as needed.
             Vendor::ZNC_SELF_MESSAGE
     };
     // NOTE: If you modify the knownCaps list, update the constants above as needed.