X-Git-Url: https://git.quassel-irc.org/?p=quassel.git;a=blobdiff_plain;f=src%2Fcommon%2Firccap.h;h=c61068e0e134e97cb71a9ccb6189c6ff5d1b4976;hp=14c0ed7c9568715507d7dd62ee9d6d1128b595c6;hb=b06a827aea68b050bf23c37e0162189a94595ee9;hpb=a2e096ed11221866f9707ad61265a9d359a21de3 diff --git a/src/common/irccap.h b/src/common/irccap.h index 14c0ed7c..c61068e0 100644 --- a/src/common/irccap.h +++ b/src/common/irccap.h @@ -101,6 +101,24 @@ namespace IrcCap { */ 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. */ @@ -112,7 +130,8 @@ namespace IrcCap { 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. @@ -122,22 +141,6 @@ namespace IrcCap { * http://ircv3.net/specs/extensions/sasl-3.1.html */ namespace SaslMech { - - /** - * Check if the given authentication mechanism is likely to be supported. - * - * @param[in] saslCapValue QString of SASL capability value, e.g. capValue(IrcCap::SASL) - * @param[in] saslMechanism Desired SASL mechanism - * @return True if mechanism supported or unknown, otherwise false - */ - inline bool maybeSupported(const QString &saslCapValue, const QString &saslMechanism) { return - ((saslCapValue.length() == 0) || (saslCapValue.contains(saslMechanism, Qt::CaseInsensitive))); } - // SASL mechanisms are only specified in capability values as part of SASL 3.2. In - // SASL 3.1, it's handled differently. If we don't know via capability value, assume it's - // supported to reduce the risk of breaking existing setups. - // See: http://ircv3.net/specs/extensions/sasl-3.1.html - // And: http://ircv3.net/specs/extensions/sasl-3.2.html - /** * PLAIN authentication, e.g. hashed password */