+
+/* Topic set by... */
+void EventStringifier::processIrcEvent333(IrcEvent *e)
+{
+ if (!checkParamCount(e, 3))
+ return;
+
+ QString channel = e->params().first();
+ // Time in IRC protocol is defined as seconds. Convert from seconds instead.
+ // See https://doc.qt.io/qt-5/qdatetime.html#fromSecsSinceEpoch
+#if QT_VERSION >= 0x050800
+ QDateTime topicSetTime = QDateTime::fromSecsSinceEpoch(e->params()[2].toLongLong()).toUTC();
+#else
+ // fromSecsSinceEpoch() was added in Qt 5.8. Manually downconvert to seconds for now.
+ // See https://doc.qt.io/qt-5/qdatetime.html#fromMSecsSinceEpoch
+ QDateTime topicSetTime = QDateTime::fromMSecsSinceEpoch(
+ (qint64)(e->params()[2].toLongLong() * 1000)).toUTC();
+#endif
+ displayMsg(e, Message::Topic, tr("Topic set by %1 on %2")
+ .arg(e->params()[1],
+ topicSetTime.toString("yyyy-MM-dd hh:mm:ss UTC")), QString(), channel);
+}
+
+
+/* RPL_INVITING - "<nick> <channel>*/
+void EventStringifier::processIrcEvent341(IrcEvent *e)
+{
+ if (!checkParamCount(e, 2))
+ return;
+
+ QString channel = e->params()[1];
+ displayMsg(e, Message::Server, tr("%1 has been invited to %2").arg(e->params().first(), channel), QString(), channel);
+}
+
+
+/* RPL_WHOREPLY: "<channel> <user> <host> <server> <nick>
+ ( "H" / "G" > ["*"] [ ( "@" / "+" ) ] :<hopcount> <real name>" */
+void EventStringifier::processIrcEvent352(IrcEvent *e)
+{
+ displayMsg(e, Message::Server, tr("[Who] %1").arg(e->params().join(" ")));
+}
+
+
+/* RPL_WHOSPCRPL: "<yournick> <num> #<channel> ~<ident> <host> <servname> <nick>
+ ("H"/ "G") <account> :<realname>"
+Could be anything else, though. User-specified fields.
+See http://faerion.sourceforge.net/doc/irc/whox.var */
+void EventStringifier::processIrcEvent354(IrcEvent *e)
+{
+ displayMsg(e, Message::Server, tr("[WhoX] %1").arg(e->params().join(" ")));
+}
+
+
+/* RPL_ENDOFWHOWAS - "<nick> :End of WHOWAS" */
+void EventStringifier::processIrcEvent369(IrcEvent *e)
+{
+ displayMsg(e, Message::Server, tr("End of /WHOWAS"));
+}
+
+
+/* ERR_ERRONEUSNICKNAME */
+void EventStringifier::processIrcEvent432(IrcEvent *e)
+{
+ if (!checkParamCount(e, 1))
+ return;
+
+ displayMsg(e, Message::Error, tr("Nick %1 contains illegal characters").arg(e->params()[0]));
+}
+
+
+/* ERR_NICKNAMEINUSE */
+void EventStringifier::processIrcEvent433(IrcEvent *e)
+{
+ if (!checkParamCount(e, 1))
+ return;
+
+ displayMsg(e, Message::Error, tr("Nick already in use: %1").arg(e->params()[0]));
+}
+
+
+/* ERR_UNAVAILRESOURCE */
+void EventStringifier::processIrcEvent437(IrcEvent *e)
+{
+ if (!checkParamCount(e, 1))
+ return;
+
+ displayMsg(e, Message::Error, tr("Nick/channel is temporarily unavailable: %1").arg(e->params()[0]));
+}
+
+