From: Manuel Nickschas Date: Tue, 19 Feb 2013 20:29:02 +0000 (+0100) Subject: Fix SASL auth with Freenode X-Git-Tag: 0.9-beta1~33 X-Git-Url: https://git.quassel-irc.org/?p=quassel.git;a=commitdiff_plain;h=29a06ef6689f251b6092cfc313e94d39c9c5db95 Fix SASL auth with Freenode Looks like Freenode adds a trailing space to its CAP ACK reply, so Quassel would hang after we don't trim incoming messages anymore. I don't particularly like the startsWith() workaround, but I guess we'll need a more capable parser anyway, should we support more caps in the future... --- diff --git a/src/core/coresessioneventprocessor.cpp b/src/core/coresessioneventprocessor.cpp index c9a7365b..07362b60 100644 --- a/src/core/coresessioneventprocessor.cpp +++ b/src/core/coresessioneventprocessor.cpp @@ -129,7 +129,7 @@ void CoreSessionEventProcessor::processIrcEventCap(IrcEvent *e) // additional CAP messages (ls, multi-prefix, et cetera). if (e->params().count() == 3) { - if (e->params().at(2) == "sasl") { + if (e->params().at(2).startsWith("sasl")) { // Freenode (at least) sends "sasl " with a trailing space for some reason! // FIXME use event coreNetwork(e)->putRawLine(coreNetwork(e)->serverEncode("AUTHENTICATE PLAIN")); // Only working with PLAIN atm, blowfish later }