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...
// additional CAP messages (ls, multi-prefix, et cetera).
if (e->params().count() == 3) {
// 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
}
// FIXME use event
coreNetwork(e)->putRawLine(coreNetwork(e)->serverEncode("AUTHENTICATE PLAIN")); // Only working with PLAIN atm, blowfish later
}