/***************************************************************************
- * Copyright (C) 2005-2012 by the Quassel Project *
+ * Copyright (C) 2005-2014 by the Quassel Project *
* devel@quassel-irc.org *
* *
* This program is free software; you can redistribute it and/or modify *
* 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"
case 253:
case 254:
case 255:
+ case 256:
+ case 257:
+ case 258:
+ case 259:
case 265:
case 266:
case 372:
break;
// Server error messages without param, just display them
+ case 263:
case 409:
case 411:
case 412:
.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)
int idleSecs = e->params()[1].toInt();
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()));
+ QDateTime loginTime = QDateTime::fromTime_t(e->params()[2].toInt()).toUTC();
+ displayMsg(e, Message::Server, tr("[Whois] %1 is logged in since %2")
+ .arg(e->params()[0], loginTime.toString("yyyy-MM-dd hh:mm:ss UTC")));
}
+ QDateTime idlingSince = e->timestamp().toLocalTime().addSecs(-idleSecs).toUTC();
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),
+ idlingSince.toString("yyyy-MM-dd hh:mm:ss UTC")));
}
qWarning() << Q_FUNC_INFO << "received invalid timestamp:" << e->params()[1];
return;
}
- QDateTime time = QDateTime::fromTime_t(unixtime);
- displayMsg(e, Message::Topic, tr("Channel %1 created on %2").arg(channel, time.toString()), QString(), channel);
+ QDateTime time = QDateTime::fromTime_t(unixtime).toUTC();
+ displayMsg(e, Message::Topic, tr("Channel %1 created on %2")
+ .arg(channel, time.toString("yyyy-MM-dd hh:mm:ss UTC")),
+ QString(), channel);
}
return;
QString channel = e->params().first();
+ QDateTime topicSetTime = QDateTime::fromTime_t(e->params()[2].toInt()).toUTC();
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],
+ topicSetTime.toString("yyyy-MM-dd hh:mm:ss UTC")), QString(), channel);
}
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
}
}