X-Git-Url: https://git.quassel-irc.org/?p=quassel.git;a=blobdiff_plain;f=src%2Fcore%2Fircserverhandler.cpp;h=952a6f87d5f435189a6f8f7cfe7ff25e5b62c670;hp=5bd4dc43514dee2079e247bf035049fd91d7df56;hb=9ba4af752f4efc11a7fe4c0ced78bae54e39ee25;hpb=bbce706bf853ede08f70392f6d40323980873800 diff --git a/src/core/ircserverhandler.cpp b/src/core/ircserverhandler.cpp index 5bd4dc43..952a6f87 100644 --- a/src/core/ircserverhandler.cpp +++ b/src/core/ircserverhandler.cpp @@ -822,11 +822,18 @@ void IrcServerHandler::handle324(const QString &prefix, const QList /* RPL_??? - " " */ void IrcServerHandler::handle329(const QString &prefix, const QList ¶ms) { Q_UNUSED(prefix); - Q_UNUSED(params) -#ifdef __GNUC__ -# warning "Implement handle329 (Channel creation time)" -#endif - // FIXME implement this... + if(!checkParamCount("IrcServerHandler::handle329()", params, 2)) + return; + + QString channel = serverDecode(params[0]); + uint unixtime = params[1].toUInt(); + if(!unixtime) { + qWarning() << Q_FUNC_INFO << "received invalid timestamp:" << params[1]; + return; + } + QDateTime time = QDateTime::fromTime_t(unixtime); + + emit displayMsg(Message::Server, BufferInfo::ChannelBuffer, channel, tr("Channel %1 created on %2").arg(channel, time.toString())); } /* RPL_NOTOPIC */