X-Git-Url: https://git.quassel-irc.org/?a=blobdiff_plain;f=src%2Fcore%2Feventstringifier.cpp;h=6ef3f8ad8ab5c22ebb640e129d2998759183e3a5;hb=56b2bf3a1a742971a5de7ced1b57024424fc78b8;hp=afb70c2314ea921c2936010b1f2932ac7ad8bbc8;hpb=921e54680da16fcf2adb7a90506875aceb6633a4;p=quassel.git diff --git a/src/core/eventstringifier.cpp b/src/core/eventstringifier.cpp index afb70c23..6ef3f8ad 100644 --- a/src/core/eventstringifier.cpp +++ b/src/core/eventstringifier.cpp @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2005-2015 by the Quassel Project * + * Copyright (C) 2005-2016 by the Quassel Project * * devel@quassel-irc.org * * * * This program is free software; you can redistribute it and/or modify * @@ -205,15 +205,29 @@ void EventStringifier::processIrcEventNumeric(IrcEventNumeric *e) case 376: break; - // CAP stuff - case 900: - case 903: - case 904: - case 905: - case 906: - case 907: + // SASL authentication stuff + // See: http://ircv3.net/specs/extensions/sasl-3.1.html + case 900: // RPL_LOGGEDIN + case 901: // RPL_LOGGEDOUT { - displayMsg(e, Message::Info, "CAP: " + e->params().join("")); + // :server 900 !@ :You are now logged in as + // :server 901 !@ :You are now logged out + if (!checkParamCount(e, 3)) + return; + displayMsg(e, Message::Server, "SASL: " + e->params().at(2)); + break; + } + // Ignore SASL success, partially redundant with RPL_LOGGEDIN and RPL_LOGGEDOUT + case 903: // RPL_SASLSUCCESS :server 903 :SASL authentication successful + break; + case 902: // ERR_NICKLOCKED :server 902 :You must use a nick assigned to you + case 904: // ERR_SASLFAIL :server 904 :SASL authentication failed + case 905: // ERR_SASLTOOLONG :server 905 :SASL message too long + case 906: // ERR_SASLABORTED :server 906 :SASL authentication aborted + case 907: // ERR_SASLALREADY :server 907 :You have already authenticated using SASL + case 908: // RPL_SASLMECHS :server 908 :are available SASL mechanisms + { + displayMsg(e, Message::Server, "SASL: " + e->params().join("")); break; } @@ -342,6 +356,15 @@ void EventStringifier::processIrcEventTopic(IrcEvent *e) .arg(e->nick(), e->params().at(0), e->params().at(1)), QString(), e->params().at(0)); } +void EventStringifier::processIrcEventError(IrcEvent *e) +{ + // Need an error reason + if (!checkParamCount(e, 1)) + return; + + displayMsg(e, Message::Server, tr("Error from server: ") + e->params().join("")); +} + void EventStringifier::processIrcEventWallops(IrcEvent *e) { displayMsg(e, Message::Server, tr("[Operwall] %1: %2").arg(e->nick(), e->params().join(" "))); @@ -643,6 +666,16 @@ void EventStringifier::processIrcEvent352(IrcEvent *e) } +/* RPL_WHOSPCRPL: " # ~ + ("H"/ "G") :" +Could be anything else, though. User-specified fields. +See http://faerion.sourceforge.net/doc/irc/whox.var */ +void EventStringifier::processIrcEvent354(IrcEvent *e) +{ + displayMsg(e, Message::Server, tr("[WhoX] %1").arg(e->params().join(" "))); +} + + /* RPL_ENDOFWHOWAS - " :End of WHOWAS" */ void EventStringifier::processIrcEvent369(IrcEvent *e) { @@ -733,12 +766,7 @@ void EventStringifier::handleCtcpPing(CtcpEvent *e) if (e->ctcpType() == CtcpEvent::Query) defaultHandler(e->ctcpCmd(), e); else { -#if QT_VERSION >= 0x040700 displayMsg(e, Message::Server, tr("Received CTCP-PING answer from %1 with %2 milliseconds round trip time") .arg(nickFromMask(e->prefix())).arg(QDateTime::fromMSecsSinceEpoch(e->param().toULongLong()).msecsTo(e->timestamp()))); -#else - displayMsg(e, Message::Server, tr("Received CTCP-PING answer from %1 with %2 seconds round trip time") - .arg(nickFromMask(e->prefix())).arg(QDateTime::fromTime_t(e->param().toInt()).secsTo(e->timestamp()))); -#endif } }