X-Git-Url: https://git.quassel-irc.org/?p=quassel.git;a=blobdiff_plain;f=src%2Fcore%2Feventstringifier.cpp;h=26a2bbe6200415f5b885224a7ea1ac74a404383f;hp=dcf48aa75c3a7deaacb6c940ca8de261b573e6a7;hb=bd5f012ca9d067c2ed55c8f2c5da1657fa81f994;hpb=5b686746c880e5cda6d5de3e08180ea4332ff222 diff --git a/src/core/eventstringifier.cpp b/src/core/eventstringifier.cpp index dcf48aa7..26a2bbe6 100644 --- a/src/core/eventstringifier.cpp +++ b/src/core/eventstringifier.cpp @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2005-2012 by the Quassel Project * + * Copyright (C) 2005-2013 by the Quassel Project * * devel@quassel-irc.org * * * * This program is free software; you can redistribute it and/or modify * @@ -337,6 +337,11 @@ void EventStringifier::processIrcEventTopic(IrcEvent *e) .arg(e->nick(), e->params().at(0), e->params().at(1)), QString(), e->params().at(0)); } +void EventStringifier::processIrcEventWallops(IrcEvent *e) +{ + displayMsg(e, Message::Server, tr("[Operwall] %1: %2").arg(e->nick(), e->params().join(" "))); +} + /* RPL_ISUPPORT */ void EventStringifier::processIrcEvent005(IrcEvent *e) @@ -457,10 +462,13 @@ void EventStringifier::processIrcEvent317(IrcEvent *e) if (e->params().count() > 3) { // if we have more then 3 params we have the above mentioned "real life" situation QDateTime loginTime = QDateTime::fromTime_t(e->params()[2].toInt()); - displayMsg(e, Message::Server, tr("[Whois] %1 is logged in since %2").arg(e->params()[0], loginTime.toString())); + displayMsg(e, Message::Server, tr("[Whois] %1 is logged in since %2") + .arg(e->params()[0], QLocale().toString(loginTime, QLocale().dateTimeFormat()))); } + QDateTime idlingSince = e->timestamp().toLocalTime().addSecs(-idleSecs); displayMsg(e, Message::Server, tr("[Whois] %1 is idling for %2 (since %3)") - .arg(e->params()[0], secondsToString(idleSecs), e->timestamp().toLocalTime().addSecs(-idleSecs).toString())); + .arg(e->params()[0], secondsToString(idleSecs), + QLocale().toString(idlingSince, QLocale().dateTimeFormat()))); } @@ -559,7 +567,9 @@ void EventStringifier::processIrcEvent329(IrcEvent *e) return; } QDateTime time = QDateTime::fromTime_t(unixtime); - displayMsg(e, Message::Topic, tr("Channel %1 created on %2").arg(channel, time.toString()), QString(), channel); + displayMsg(e, Message::Topic, tr("Channel %1 created on %2") + .arg(channel, QLocale().toString(time, QLocale().dateTimeFormat())), + QString(), channel); } @@ -602,8 +612,10 @@ void EventStringifier::processIrcEvent333(IrcEvent *e) return; QString channel = e->params().first(); + QDateTime topicSetTime = QDateTime::fromTime_t(e->params()[2].toInt()); displayMsg(e, Message::Topic, tr("Topic set by %1 on %2") - .arg(e->params()[1], QDateTime::fromTime_t(e->params()[2].toInt()).toString()), QString(), channel); + .arg(e->params()[1], + QLocale().toString(topicSetTime, QLocale().dateTimeFormat())), QString(), channel); }