X-Git-Url: https://git.quassel-irc.org/?a=blobdiff_plain;f=src%2Fcore%2Feventstringifier.cpp;h=c7da8d78b5279beecdfdf69bfec90977d3ff14d2;hb=fc26ee91d0e387007d656eb6e83a7a3a923f527a;hp=725268c16c862262c4c2399198472d0813c9ec94;hpb=81e93e5a0e6e829c690c7c9923086b959f2289c4;p=quassel.git diff --git a/src/core/eventstringifier.cpp b/src/core/eventstringifier.cpp index 725268c1..c7da8d78 100644 --- a/src/core/eventstringifier.cpp +++ b/src/core/eventstringifier.cpp @@ -365,10 +365,11 @@ void EventStringifier::processIrcEventPart(IrcEvent *e) void EventStringifier::processIrcEventPong(IrcEvent *e) { - QString timestamp = e->params().at(1); - QTime sendTime = QTime::fromString(timestamp, "hh:mm:ss.zzz"); - if (!sendTime.isValid()) - displayMsg(e, Message::Server, "PONG " + e->params().join(" "), e->prefix()); + // CoreSessionEventProcessor will flag automated PONG replies as EventManager::Silent. There's + // no need to handle that specially here. + + // Format the PONG reply for display + displayMsg(e, Message::Server, "PONG " + e->params().join(" "), e->prefix()); } @@ -453,9 +454,9 @@ void EventStringifier::processIrcEvent301(IrcEvent *e) now.setTimeSpec(Qt::UTC); // Don't print "user is away" messages more often than this const int silenceTime = 60; - if (ircuser->lastAwayMessage().addSecs(silenceTime) >= now) + if (ircuser->lastAwayMessageTime().addSecs(silenceTime) >= now) send = false; - ircuser->setLastAwayMessage(now); + ircuser->setLastAwayMessageTime(now); } } if (send)