X-Git-Url: https://git.quassel-irc.org/?p=quassel.git;a=blobdiff_plain;f=src%2Fcore%2Feventstringifier.cpp;h=26a2bbe6200415f5b885224a7ea1ac74a404383f;hp=947317a038bc3774fd1e234eda20dff03ee5eea3;hb=bd5f012ca9d067c2ed55c8f2c5da1657fa81f994;hpb=694f9bfbf7f1af19108461c7e00d133e55082bce diff --git a/src/core/eventstringifier.cpp b/src/core/eventstringifier.cpp index 947317a0..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 * @@ -15,7 +15,7 @@ * You should have received a copy of the GNU General Public License * * along with this program; if not, write to the * * Free Software Foundation, Inc., * - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * ***************************************************************************/ #include "eventstringifier.h" @@ -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); }