X-Git-Url: https://git.quassel-irc.org/?p=quassel.git;a=blobdiff_plain;f=src%2Fcore%2Feventstringifier.cpp;h=66f0e274d12e546d25653754ea28d3c45508af3a;hp=787bac58822951ca84de581aa1c03c67f31cf2a2;hb=f8ebd4fd9a59bcb34a6ce45ce1f0b4a22beae884;hpb=55dca474dbeb2cebaec98493677e03f56fac39c6;ds=sidebyside diff --git a/src/core/eventstringifier.cpp b/src/core/eventstringifier.cpp index 787bac58..66f0e274 100644 --- a/src/core/eventstringifier.cpp +++ b/src/core/eventstringifier.cpp @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2005-2013 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 * @@ -104,6 +104,10 @@ void EventStringifier::processIrcEventNumeric(IrcEventNumeric *e) case 253: case 254: case 255: + case 256: + case 257: + case 258: + case 259: case 265: case 266: case 372: @@ -112,6 +116,7 @@ void EventStringifier::processIrcEventNumeric(IrcEventNumeric *e) break; // Server error messages without param, just display them + case 263: case 409: case 411: case 412: @@ -337,6 +342,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(" "))); @@ -728,7 +742,7 @@ void EventStringifier::handleCtcpPing(CtcpEvent *e) if (e->ctcpType() == CtcpEvent::Query) defaultHandler(e->ctcpCmd(), e); 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()))); + 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()))); } }