From: Johannes Huber Date: Tue, 27 Jul 2010 02:12:49 +0000 (+0200) Subject: new handler for RPL_INVITING 341, fixes #1007 X-Git-Tag: 0.7-beta1~17 X-Git-Url: https://git.quassel-irc.org/?p=quassel.git;a=commitdiff_plain;h=34f8c25852c4e030a2384923c7d36211579953c9 new handler for RPL_INVITING 341, fixes #1007 --- diff --git a/src/core/ircserverhandler.cpp b/src/core/ircserverhandler.cpp index 033d6c8d..4c421dad 100644 --- a/src/core/ircserverhandler.cpp +++ b/src/core/ircserverhandler.cpp @@ -1039,6 +1039,23 @@ void IrcServerHandler::handle333(const QString &prefix, const QList tr("Topic set by %1 on %2") .arg(serverDecode(params[1]), QDateTime::fromTime_t(channelDecode(channel, params[2]).toUInt()).toString())); } +/* RPL_INVITING - " */ +void IrcServerHandler::handle341(const QString &prefix, const QList ¶ms) { + Q_UNUSED(prefix); + if(!checkParamCount("IrcServerHandler::handle341()", params, 2)) + return; + + QString nick = serverDecode(params[0]); + + IrcChannel *channel = network()->ircChannel(serverDecode(params[1])); + if(!channel) { + qWarning() << "IrcServerHandler::handle341(): unknown channel:" << params[1]; + return; + } + + emit displayMsg(Message::Server, BufferInfo::ChannelBuffer, channel->name(), tr("%1 has been invited to %2").arg(nick).arg(channel->name())); +} + /* RPL_WHOREPLY: " ( "H" / "G" > ["*"] [ ( "@" / "+" ) ] : " */ void IrcServerHandler::handle352(const QString &prefix, const QList ¶ms) { diff --git a/src/core/ircserverhandler.h b/src/core/ircserverhandler.h index 652c808e..30f2d1d6 100644 --- a/src/core/ircserverhandler.h +++ b/src/core/ircserverhandler.h @@ -76,6 +76,7 @@ public slots: void handle331(const QString &prefix, const QList ¶ms); // RPL_NOTOPIC void handle332(const QString &prefix, const QList ¶ms); // RPL_TOPIC void handle333(const QString &prefix, const QList ¶ms); // Topic set by... + void handle341(const QString &prefix, const QList ¶ms); // RPL_INVITING void handle352(const QString &prefix, const QList ¶ms); // RPL_WHOREPLY void handle353(const QString &prefix, const QList ¶ms); // RPL_NAMREPLY void handle369(const QString &prefix, const QList ¶ms); // RPL_ENDOFWHOWAS