X-Git-Url: https://git.quassel-irc.org/?p=quassel.git;a=blobdiff_plain;f=src%2Fcore%2Fcoresessioneventprocessor.cpp;h=41e240391beebe42bfadffdf094ada69cbefba24;hp=bc7f88b89ada9c524e09cd122428f51e9527be75;hb=bbe4e00c72ef57febad268b6937d950c01969a54;hpb=84cd3561e97167ffb98ecab0fd2b884ba1d13ada diff --git a/src/core/coresessioneventprocessor.cpp b/src/core/coresessioneventprocessor.cpp index bc7f88b8..41e24039 100644 --- a/src/core/coresessioneventprocessor.cpp +++ b/src/core/coresessioneventprocessor.cpp @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2005-2014 by the Quassel Project * + * Copyright (C) 2005-2015 by the Quassel Project * * devel@quassel-irc.org * * * * This program is free software; you can redistribute it and/or modify * @@ -144,19 +144,25 @@ void CoreSessionEventProcessor::processIrcEventCap(IrcEvent *e) // additional CAP messages (ls, multi-prefix, et cetera). if (e->params().count() == 3) { - if (e->params().at(2).startsWith("sasl")) { // Freenode (at least) sends "sasl " with a trailing space for some reason! - // FIXME use event - // if the current identity has a cert set, use SASL EXTERNAL + if (e->params().at(1) == "NAK") { + // CAP REQ sasl was denied + coreNetwork(e)->putRawLine("CAP END"); + } + else if (e->params().at(1) == "ACK") { + if (e->params().at(2).startsWith("sasl")) { // Freenode (at least) sends "sasl " with a trailing space for some reason! + // FIXME use event + // if the current identity has a cert set, use SASL EXTERNAL #ifdef HAVE_SSL - if (!coreNetwork(e)->identityPtr()->sslCert().isNull()) { - coreNetwork(e)->putRawLine(coreNetwork(e)->serverEncode("AUTHENTICATE EXTERNAL")); - } else { + if (!coreNetwork(e)->identityPtr()->sslCert().isNull()) { + coreNetwork(e)->putRawLine(coreNetwork(e)->serverEncode("AUTHENTICATE EXTERNAL")); + } else { #endif - // Only working with PLAIN atm, blowfish later - coreNetwork(e)->putRawLine(coreNetwork(e)->serverEncode("AUTHENTICATE PLAIN")); + // Only working with PLAIN atm, blowfish later + coreNetwork(e)->putRawLine(coreNetwork(e)->serverEncode("AUTHENTICATE PLAIN")); #ifdef HAVE_SSL - } + } #endif + } } } } @@ -480,14 +486,10 @@ void CoreSessionEventProcessor::processKeyEvent(KeyEvent *e) /* RPL_WELCOME */ -void CoreSessionEventProcessor::processIrcEvent001(IrcEvent *e) +void CoreSessionEventProcessor::processIrcEvent001(IrcEventNumeric *e) { - if (!checkParamCount(e, 1)) - return; - - QString myhostmask = e->params().at(0).section(' ', -1, -1); e->network()->setCurrentServer(e->prefix()); - e->network()->setMyNick(nickFromMask(myhostmask)); + e->network()->setMyNick(e->target()); } @@ -1093,5 +1095,5 @@ void CoreSessionEventProcessor::handleCtcpTime(CtcpEvent *e) void CoreSessionEventProcessor::handleCtcpVersion(CtcpEvent *e) { e->setReply(QString("Quassel IRC %1 (built on %2) -- http://www.quassel-irc.org") - .arg(Quassel::buildInfo().plainVersionString).arg(Quassel::buildInfo().buildDate)); + .arg(Quassel::buildInfo().plainVersionString).arg(Quassel::buildInfo().commitDate)); }