X-Git-Url: https://git.quassel-irc.org/?p=quassel.git;a=blobdiff_plain;f=src%2Fcommon%2Fnetwork.cpp;h=885cc50b113b4b0600d7a7f2a1d3393336ddaa24;hp=cb4adb5c82cc794bdbe89609b9026aba24acec83;hb=b2c3e61e5888741644b24f5b3701a6311ec631dd;hpb=0b983b0d9364e62db0b5e6cf25988ef8041a0c5d diff --git a/src/common/network.cpp b/src/common/network.cpp index cb4adb5c..885cc50b 100644 --- a/src/common/network.cpp +++ b/src/common/network.cpp @@ -243,6 +243,14 @@ QString Network::support(const QString ¶m) const bool Network::saslMaybeSupports(const QString &saslMechanism) const { + if (!capAvailable(IrcCap::SASL)) { + // If SASL's not advertised at all, it's likely the mechanism isn't supported, as per specs. + // Unfortunately, we don't know for sure, but Quassel won't request SASL without it being + // advertised, anyways. + // This may also occur if the network's disconnected or negotiation hasn't yet happened. + return false; + } + // Get the SASL capability value QString saslCapValue = capValue(IrcCap::SASL); // SASL mechanisms are only specified in capability values as part of SASL 3.2. In SASL 3.1,