handler for RPL_WHOISACCOUNT(330), fixes #210
authorJohannes Huber <johu@gmx.de>
Fri, 13 Aug 2010 13:08:32 +0000 (15:08 +0200)
committerManuel Nickschas <sputnick@quassel-irc.org>
Wed, 25 Aug 2010 08:28:48 +0000 (10:28 +0200)
we handled it already in default case for numeric replies, but the
output for 330 was not well formed (see bug request).

src/core/ircserverhandler.cpp
src/core/ircserverhandler.h

index 2e15fc9..7004e86 100644 (file)
@@ -1005,6 +1005,18 @@ void IrcServerHandler::handle329(const QString &prefix, const QList<QByteArray>
   emit displayMsg(Message::Server, BufferInfo::ChannelBuffer, channel, tr("Channel %1 created on %2").arg(channel, time.toString()));
 }
 
   emit displayMsg(Message::Server, BufferInfo::ChannelBuffer, channel, tr("Channel %1 created on %2").arg(channel, time.toString()));
 }
 
+/*  RPL_WHOISACCOUNT: "<nick> <account> :is authed as */
+void IrcServerHandler::handle330(const QString &prefix, const QList<QByteArray> &params) {
+  Q_UNUSED(prefix);
+  if(!checkParamCount("IrcServerHandler::handle330()", params, 3))
+    return;
+
+  QString nick = serverDecode(params[0]);
+  QString account = serverDecode(params[1]);
+
+  emit displayMsg(Message::Server, BufferInfo::StatusBuffer, "",  tr("[Whois] %1 is authed as %2").arg(nick).arg(account));
+}
+
 /* RPL_NOTOPIC */
 void IrcServerHandler::handle331(const QString &prefix, const QList<QByteArray> &params) {
   Q_UNUSED(prefix);
 /* RPL_NOTOPIC */
 void IrcServerHandler::handle331(const QString &prefix, const QList<QByteArray> &params) {
   Q_UNUSED(prefix);
index 30f2d1d..2f9623c 100644 (file)
@@ -73,6 +73,7 @@ public slots:
   void handle324(const QString &prefix, const QList<QByteArray> &params);   // RPL_CHANNELMODEIS
   void handle328(const QString &prefix, const QList<QByteArray> &params);   // RPL_??? (channel homepage)
   void handle329(const QString &prefix, const QList<QByteArray> &params);   // RPL_??? (channel creation time)
   void handle324(const QString &prefix, const QList<QByteArray> &params);   // RPL_CHANNELMODEIS
   void handle328(const QString &prefix, const QList<QByteArray> &params);   // RPL_??? (channel homepage)
   void handle329(const QString &prefix, const QList<QByteArray> &params);   // RPL_??? (channel creation time)
+  void handle330(const QString &prefix, const QList<QByteArray> &params);   // RPL_WHOISACCOUNT (quakenet/snircd/undernet)
   void handle331(const QString &prefix, const QList<QByteArray> &params);   // RPL_NOTOPIC
   void handle332(const QString &prefix, const QList<QByteArray> &params);   // RPL_TOPIC
   void handle333(const QString &prefix, const QList<QByteArray> &params);   // Topic set by...
   void handle331(const QString &prefix, const QList<QByteArray> &params);   // RPL_NOTOPIC
   void handle332(const QString &prefix, const QList<QByteArray> &params);   // RPL_TOPIC
   void handle333(const QString &prefix, const QList<QByteArray> &params);   // Topic set by...