From: Shane Synan Date: Sun, 8 Nov 2020 03:11:39 +0000 (-0500) Subject: core: In CoreNetwork, check Network::useSasl() X-Git-Tag: 0.14-rc1~23 X-Git-Url: https://git.quassel-irc.org/?a=commitdiff_plain;h=64323f7d66dd9a631b86ff07732c3702933d3846;p=quassel.git core: In CoreNetwork, check Network::useSasl() In CoreNetwork, directly check the Network::useSasl() function instead of reaching into networkInfo(). All the other code within CoreNetwork checks the properties on Network, and useSasl() is already updated within Network::setNetworkInfo(). This provides consistency with atomic network information updates. --- diff --git a/src/core/corenetwork.cpp b/src/core/corenetwork.cpp index 438a42a7..17cf26d3 100644 --- a/src/core/corenetwork.cpp +++ b/src/core/corenetwork.cpp @@ -1086,8 +1086,9 @@ void CoreNetwork::serverCapAdded(const QString& capability) // Handle special cases first if (capability == IrcCap::SASL) { // Only request SASL if it's enabled - if (networkInfo().useSasl) + if (useSasl()) { queueCap(capability); + } } else if (IrcCap::knownCaps.contains(capability)) { // Handling for general known capabilities @@ -1367,7 +1368,7 @@ void CoreNetwork::sendNextCap() else { // No pending desired capabilities, capability negotiation finished // If SASL requested but not available, print a warning - if (networkInfo().useSasl && !capEnabled(IrcCap::SASL)) + if (useSasl() && !capEnabled(IrcCap::SASL)) showMessage(NetworkInternalMessage( Message::Error, BufferInfo::StatusBuffer,