Enable self message support for ZNC
authorShane Synan <digitalcircuit36939@gmail.com>
Thu, 16 Jun 2016 00:19:59 +0000 (20:19 -0400)
committerManuel Nickschas <sputnick@quassel-irc.org>
Mon, 5 Sep 2016 17:30:54 +0000 (19:30 +0200)
Request the 'znc.in/self-message' capability to enable self message
support on ZNC.

Some servers (e.g. Bitlbee) assume self-message support; ZNC requires
a capability instead.  As self-message is already implemented,
there's little reason to not do this.

Who says we can't all get along? :)

There's more information in the IRCv3 commit that removed the
'self-message' capability.

See https://github.com/ircv3/ircv3-specifications/commit/1bfba47843c2526707c902034b3395af934713c8

Closes GH-202.

src/common/irccap.h

index 14c0ed7..bbee7cd 100644 (file)
@@ -101,6 +101,24 @@ namespace IrcCap {
      */
     const QString USERHOST_IN_NAMES = "userhost-in-names";
 
      */
     const QString USERHOST_IN_NAMES = "userhost-in-names";
 
+    /**
+     * Vendor-specific capabilities
+     */
+    namespace Vendor {
+
+        /**
+         * Self message support, as recognized by ZNC.
+         *
+         * Some servers (e.g. Bitlbee) assume self-message support; ZNC requires a capability
+         * instead.  As self-message is already implemented, there's little reason to not do this.
+         *
+         * More information in the IRCv3 commit that removed the 'self-message' capability.
+         *
+         * https://github.com/ircv3/ircv3-specifications/commit/1bfba47843c2526707c902034b3395af934713c8
+         */
+        const QString ZNC_SELF_MESSAGE = "znc.in/self-message";
+    }
+
     /**
      * List of capabilities currently implemented and requested during capability negotiation.
      */
     /**
      * List of capabilities currently implemented and requested during capability negotiation.
      */
@@ -112,7 +130,8 @@ namespace IrcCap {
             EXTENDED_JOIN,
             MULTI_PREFIX,
             SASL,
             EXTENDED_JOIN,
             MULTI_PREFIX,
             SASL,
-            USERHOST_IN_NAMES
+            USERHOST_IN_NAMES,
+            Vendor::ZNC_SELF_MESSAGE
     };
     // NOTE: If you modify the knownCaps list, update the constants above as needed.
 
     };
     // NOTE: If you modify the knownCaps list, update the constants above as needed.