Event backend porting, mostly WHOIS-related stuff
authorManuel Nickschas <sputnick@quassel-irc.org>
Thu, 7 Oct 2010 09:55:43 +0000 (11:55 +0200)
committerManuel Nickschas <sputnick@quassel-irc.org>
Wed, 13 Oct 2010 23:06:33 +0000 (01:06 +0200)
RPL_WHOISSERVICE (307), RPL_SUSERHOST (310), RPL_WHOISUSER (311), RPL_WHOISSERVER (312),
RPL_WHOISOPERATOR (313), RPL_WHOWASUSER (314), RPL_ENDOFWHO (315), RPL_WHOISIDLE (317),
RPL_ENDOFWHOIS (318), RPL_WHOISCHANNELS (319), RPL_WHOISVIRT (320), RPL_WHOISACCOUNT (330)

src/core/coresessioneventprocessor.cpp
src/core/coresessioneventprocessor.h
src/core/eventstringifier.cpp
src/core/eventstringifier.h
src/core/ircserverhandler.cpp
src/core/ircserverhandler.h

index bc7d1fb..3abae90 100644 (file)
@@ -23,6 +23,7 @@
 #include "corenetwork.h"
 #include "coresession.h"
 #include "ircevent.h"
 #include "corenetwork.h"
 #include "coresession.h"
 #include "ircevent.h"
+#include "ircuser.h"
 
 CoreSessionEventProcessor::CoreSessionEventProcessor(CoreSession *session)
   : QObject(session),
 
 CoreSessionEventProcessor::CoreSessionEventProcessor(CoreSession *session)
   : QObject(session),
@@ -235,6 +236,92 @@ void CoreSessionEventProcessor::processIrcEvent306(IrcEvent *e) {
     me->setAway(true);
 }
 
     me->setAway(true);
 }
 
+/* RPL_WHOISSERVICE - "<user> is registered nick" */
+void CoreSessionEventProcessor::processIrcEvent307(IrcEvent *e) {
+  if(!checkParamCount(e, 1))
+    return;
+
+  IrcUser *ircuser = e->network()->ircUser(e->params().at(0));
+  if(ircuser)
+    ircuser->setWhoisServiceReply(e->params().join(" "));
+}
+
+/* RPL_SUSERHOST - "<user> is available for help." */
+void CoreSessionEventProcessor::processIrcEvent310(IrcEvent *e) {
+  if(!checkParamCount(e, 1))
+    return;
+
+  IrcUser *ircuser = e->network()->ircUser(e->params().at(0));
+  if(ircuser)
+    ircuser->setSuserHost(e->params().join(" "));
+}
+
+/*  RPL_WHOISUSER - "<nick> <user> <host> * :<real name>" */
+void CoreSessionEventProcessor::processIrcEvent311(IrcEvent *e) {
+  if(!checkParamCount(e, 3))
+    return;
+
+  IrcUser *ircuser = e->network()->ircUser(e->params().at(0));
+  if(ircuser) {
+    ircuser->setUser(e->params().at(1));
+    ircuser->setHost(e->params().at(2));
+    ircuser->setRealName(e->params().last());
+  }
+}
+
+/*  RPL_WHOISSERVER -  "<nick> <server> :<server info>" */
+void CoreSessionEventProcessor::processIrcEvent312(IrcEvent *e) {
+  if(!checkParamCount(e, 2))
+    return;
+
+  IrcUser *ircuser = e->network()->ircUser(e->params().at(0));
+  if(ircuser)
+    ircuser->setServer(e->params().at(1));
+}
+
+/*  RPL_WHOISOPERATOR - "<nick> :is an IRC operator" */
+void CoreSessionEventProcessor::processIrcEvent313(IrcEvent *e) {
+  if(!checkParamCount(e, 1))
+    return;
+
+  IrcUser *ircuser = e->network()->ircUser(e->params().at(0));
+  if(ircuser)
+    ircuser->setIrcOperator(e->params().last());
+}
+
+/*  RPL_ENDOFWHO: "<name> :End of WHO list" */
+void CoreSessionEventProcessor::processIrcEvent315(IrcEvent *e) {
+  if(!checkParamCount(e, 1))
+    return;
+
+  if(coreNetwork(e)->setAutoWhoDone(e->params()[0]))
+    e->setFlag(EventManager::Silent);
+}
+
+/*  RPL_WHOISIDLE - "<nick> <integer> :seconds idle"
+   (real life: "<nick> <integer> <integer> :seconds idle, signon time) */
+void CoreSessionEventProcessor::processIrcEvent317(IrcEvent *e) {
+  if(!checkParamCount(e, 2))
+    return;
+
+  QDateTime loginTime;
+
+  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
+    int logintime = e->params()[2].toInt();
+    loginTime = QDateTime::fromTime_t(logintime);
+  }
+
+  IrcUser *ircuser = e->network()->ircUser(e->params()[0]);
+  if(ircuser) {
+    ircuser->setIdleTime(e->timestamp().addSecs(-idleSecs));
+    if(loginTime.isValid())
+      ircuser->setLoginTime(loginTime);
+  }
+}
+
+
+
 /* template
 void CoreSessionEventProcessor::processIrcEvent(IrcEvent *e) {
   if(!checkParamCount(e, 1))
 /* template
 void CoreSessionEventProcessor::processIrcEvent(IrcEvent *e) {
   if(!checkParamCount(e, 1))
index e164ca8..edb4b2d 100644 (file)
@@ -55,6 +55,13 @@ public:
   Q_INVOKABLE void processIrcEvent301(IrcEvent *event);            // RPL_AWAY
   Q_INVOKABLE void processIrcEvent305(IrcEvent *event);            // RPL_UNAWAY
   Q_INVOKABLE void processIrcEvent306(IrcEvent *event);            // RPL_NOWAWAY
   Q_INVOKABLE void processIrcEvent301(IrcEvent *event);            // RPL_AWAY
   Q_INVOKABLE void processIrcEvent305(IrcEvent *event);            // RPL_UNAWAY
   Q_INVOKABLE void processIrcEvent306(IrcEvent *event);            // RPL_NOWAWAY
+  Q_INVOKABLE void processIrcEvent307(IrcEvent *event);            // RPL_WHOISSERVICE
+  Q_INVOKABLE void processIrcEvent310(IrcEvent *event);            // RPL_SUSERHOST
+  Q_INVOKABLE void processIrcEvent311(IrcEvent *event);            // RPL_WHOISUSER
+  Q_INVOKABLE void processIrcEvent312(IrcEvent *event);            // RPL_WHOISSERVER
+  Q_INVOKABLE void processIrcEvent313(IrcEvent *event);            // RPL_WHOISOPERATOR
+  Q_INVOKABLE void processIrcEvent315(IrcEvent *event);            // RPL_ENDOFWHO
+  Q_INVOKABLE void processIrcEvent317(IrcEvent *event);            // RPL_WHOISIDLE
 
   // Q_INVOKABLE void processIrcEvent(IrcEvent *event);
 
 
   // Q_INVOKABLE void processIrcEvent(IrcEvent *event);
 
index c5b2f44..96cb054 100644 (file)
@@ -207,3 +207,115 @@ void EventStringifier::processIrcEvent306(IrcEvent *e) {
   if(!e->network()->autoAwayActive())
     displayMsg(e, Message::Server, tr("You have been marked as being away"));
 }
   if(!e->network()->autoAwayActive())
     displayMsg(e, Message::Server, tr("You have been marked as being away"));
 }
+
+/*
+WHOIS-Message:
+   Replies 311 - 313, 317 - 319 are all replies generated in response to a WHOIS message.
+  and 301 (RPL_AWAY)
+              "<nick> :<away message>"
+WHO-Message:
+   Replies 352 and 315 paired are used to answer a WHO message.
+
+WHOWAS-Message:
+   Replies 314 and 369 are responses to a WHOWAS message.
+
+*/
+
+/*  RPL_WHOISUSER - "<nick> <user> <host> * :<real name>" */
+void EventStringifier::processIrcEvent311(IrcEvent *e) {
+  _whois = true;
+
+  const QString whoisUserString = tr("[Whois] %1 is %2 (%3)");
+
+  IrcUser *ircuser = e->network()->ircUser(e->params().at(0));
+  if(ircuser)
+    displayMsg(e, Message::Server, whoisUserString.arg(ircuser->nick(), ircuser->hostmask(), ircuser->realName()));
+  else {
+    QString host = QString("%1!%2@%3").arg(e->params().at(0), e->params().at(1), e->params().at(2));
+    displayMsg(e, Message::Server, whoisUserString.arg(e->params().at(0), host, e->params().last()));
+  }
+}
+
+/*  RPL_WHOISSERVER -  "<nick> <server> :<server info>" */
+void EventStringifier::processIrcEvent312(IrcEvent *e) {
+  if(_whois)
+    displayMsg(e, Message::Server, tr("[Whois] %1 is online via %2 (%3)").arg(e->params().at(0), e->params().at(1), e->params().last()));
+  else
+    displayMsg(e, Message::Server, tr("[Whowas] %1 was online via %2 (%3)").arg(e->params().at(0), e->params().at(1), e->params().last()));
+}
+
+/*  RPL_WHOWASUSER - "<nick> <user> <host> * :<real name>" */
+void EventStringifier::processIrcEvent314(IrcEvent *e) {
+  if(e->params().count() < 3)
+    return;
+
+  displayMsg(e, Message::Server, tr("[Whowas] %1 was %2@%3 (%4)").arg(e->params()[0], e->params()[1], e->params()[2], e->params().last()));
+}
+
+/*  RPL_ENDOFWHO: "<name> :End of WHO list" */
+void EventStringifier::processIrcEvent315(IrcEvent *e) {
+  QStringList p = e->params();
+  p.takeLast(); // should be "End of WHO list"
+  displayMsg(e, Message::Server, tr("[Who] End of /WHO list for %1").arg(p.join(" ")));
+}
+
+/*  RPL_WHOISIDLE - "<nick> <integer> :seconds idle"
+   (real life: "<nick> <integer> <integer> :seconds idle, signon time) */
+void EventStringifier::processIrcEvent317(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()));
+  }
+  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()));
+}
+
+/*  RPL_ENDOFWHOIS - "<nick> :End of WHOIS list" */
+void EventStringifier::processIrcEvent318(IrcEvent *e) {
+  _whois = false;
+  displayMsg(e, Message::Server, tr("[Whois] End of /WHOIS list"));
+}
+
+/*  RPL_WHOISCHANNELS - "<nick> :*( ( "@" / "+" ) <channel> " " )" */
+void EventStringifier::processIrcEvent319(IrcEvent *e) {
+  if(e->params().count() < 2)
+    return;
+
+  QString nick = e->params().first();
+  QStringList op;
+  QStringList voice;
+  QStringList user;
+  foreach(QString channel, e->params().last().split(" ")) {
+    if(channel.startsWith("@"))
+       op.append(channel.remove(0,1));
+    else if(channel.startsWith("+"))
+      voice.append(channel.remove(0,1));
+    else
+      user.append(channel);
+  }
+  if(!user.isEmpty())
+    displayMsg(e, Message::Server, tr("[Whois] %1 is a user on channels: %2").arg(nick, user.join(" ")));
+  if(!voice.isEmpty())
+    displayMsg(e, Message::Server, tr("[Whois] %1 has voice on channels: %2").arg(nick, voice.join(" ")));
+  if(!op.isEmpty())
+    displayMsg(e, Message::Server, tr("[Whois] %1 is an operator on channels: %2").arg(nick, op.join(" ")));
+}
+
+/*  RPL_WHOISACCOUNT: "<nick> <account> :is authed as */
+void EventStringifier::processIrcEvent330(IrcEvent *e) {
+  if(e->params().count() < 3)
+    return;
+
+  displayMsg(e, Message::Server, tr("[Whois] %1 is authed as %2").arg(e->params()[0], e->params()[1]));
+}
+
+// template
+/*
+
+void EventStringifier::processIrcEvent(IrcEvent *e) {
+
+}
+
+*/
index fd7a2f5..80b3c81 100644 (file)
@@ -60,6 +60,14 @@ public:
   Q_INVOKABLE void processIrcEvent301(IrcEvent *event);      // RPL_AWAY
   Q_INVOKABLE void processIrcEvent305(IrcEvent *event);      // RPL_UNAWAY
   Q_INVOKABLE void processIrcEvent306(IrcEvent *event);      // RPL_NOWAWAY
   Q_INVOKABLE void processIrcEvent301(IrcEvent *event);      // RPL_AWAY
   Q_INVOKABLE void processIrcEvent305(IrcEvent *event);      // RPL_UNAWAY
   Q_INVOKABLE void processIrcEvent306(IrcEvent *event);      // RPL_NOWAWAY
+  Q_INVOKABLE void processIrcEvent311(IrcEvent *event);      // RPL_WHOISUSER
+  Q_INVOKABLE void processIrcEvent312(IrcEvent *event);      // RPL_WHOISSERVER
+  Q_INVOKABLE void processIrcEvent314(IrcEvent *event);      // RPL_WHOWASUSER
+  Q_INVOKABLE void processIrcEvent315(IrcEvent *event);      // RPL_ENDOFWHO
+  Q_INVOKABLE void processIrcEvent317(IrcEvent *event);      // RPL_WHOISIDLE
+  Q_INVOKABLE void processIrcEvent318(IrcEvent *event);      // RPL_ENDOFWHOIS
+  Q_INVOKABLE void processIrcEvent319(IrcEvent *event);      // RPL_WHOISCHANNELS
+  Q_INVOKABLE void processIrcEvent330(IrcEvent *event);      // RPL_WHOISACCOUNT (quakenet/snircd/undernet)
 
   // Q_INVOKABLE void processIrcEvent(IrcEvent *event);
 
 
   // Q_INVOKABLE void processIrcEvent(IrcEvent *event);
 
index debe2ef..efe1e53 100644 (file)
@@ -429,198 +429,6 @@ void IrcServerHandler::handle005(const QString &prefix, const QList<QByteArray>
   network()->determinePrefixes();
 }
 
   network()->determinePrefixes();
 }
 
-/*
-WHOIS-Message:
-   Replies 311 - 313, 317 - 319 are all replies generated in response to a WHOIS message.
-  and 301 (RPL_AWAY)
-              "<nick> :<away message>"
-WHO-Message:
-   Replies 352 and 315 paired are used to answer a WHO message.
-
-WHOWAS-Message:
-   Replies 314 and 369 are responses to a WHOWAS message.
-
-*/
-
-/* RPL_WHOISSERVICE - "<user> is registered nick" */
-void IrcServerHandler::handle307(const QString &prefix, const QList<QByteArray> &params) {
-  Q_UNUSED(prefix)
-  if(!checkParamCount("IrcServerHandler::handle307()", params, 1))
-    return;
-
-  QString whoisServiceReply = serverDecode(params).join(" ");
-  IrcUser *ircuser = network()->ircUser(serverDecode(params[0]));
-  if(ircuser) {
-    ircuser->setWhoisServiceReply(whoisServiceReply);
-  }
-  emit displayMsg(Message::Server, BufferInfo::StatusBuffer, "", tr("[Whois] %1").arg(whoisServiceReply));
-}
-
-/* RPL_SUSERHOST - "<user> is available for help." */
-void IrcServerHandler::handle310(const QString &prefix, const QList<QByteArray> &params) {
-  Q_UNUSED(prefix)
-  if(!checkParamCount("IrcServerHandler::handle310()", params, 1))
-    return;
-
-  QString suserHost = serverDecode(params).join(" ");
-  IrcUser *ircuser = network()->ircUser(serverDecode(params[0]));
-  if(ircuser) {
-    ircuser->setSuserHost(suserHost);
-  }
-  emit displayMsg(Message::Server, BufferInfo::StatusBuffer, "", tr("[Whois] %1").arg(suserHost));
-}
-
-/*  RPL_WHOISUSER - "<nick> <user> <host> * :<real name>" */
-void IrcServerHandler::handle311(const QString &prefix, const QList<QByteArray> &params) {
-  Q_UNUSED(prefix)
-  if(!checkParamCount("IrcServerHandler::handle311()", params, 3))
-    return;
-
-  _whois = true;
-  IrcUser *ircuser = network()->ircUser(serverDecode(params[0]));
-  if(ircuser) {
-    ircuser->setUser(serverDecode(params[1]));
-    ircuser->setHost(serverDecode(params[2]));
-    ircuser->setRealName(serverDecode(params.last()));
-    emit displayMsg(Message::Server, BufferInfo::StatusBuffer, "", tr("[Whois] %1 is %2 (%3)") .arg(ircuser->nick()).arg(ircuser->hostmask()).arg(ircuser->realName()));
-  } else {
-    QString host = QString("%1!%2@%3").arg(serverDecode(params[0])).arg(serverDecode(params[1])).arg(serverDecode(params[2]));
-    emit displayMsg(Message::Server, BufferInfo::StatusBuffer, "", tr("[Whois] %1 is %2 (%3)") .arg(serverDecode(params[0])).arg(host).arg(serverDecode(params.last())));
-  }
-}
-
-/*  RPL_WHOISSERVER -  "<nick> <server> :<server info>" */
-void IrcServerHandler::handle312(const QString &prefix, const QList<QByteArray> &params) {
-  Q_UNUSED(prefix)
-  if(!checkParamCount("IrcServerHandler::handle312()", params, 2))
-    return;
-
-  IrcUser *ircuser = network()->ircUser(serverDecode(params[0]));
-  if(ircuser) {
-    ircuser->setServer(serverDecode(params[1]));
-  }
-
-  QString returnString = tr("%1 is online via %2 (%3)").arg(serverDecode(params[0])).arg(serverDecode(params[1])).arg(serverDecode(params.last()));
-  if(_whois) {
-    emit displayMsg(Message::Server, BufferInfo::StatusBuffer, "", tr("[Whois] %1").arg(returnString));
-  } else {
-    emit displayMsg(Message::Server, BufferInfo::StatusBuffer, "", tr("[Whowas] %1").arg(returnString));
-  }
-}
-
-/*  RPL_WHOISOPERATOR - "<nick> :is an IRC operator" */
-void IrcServerHandler::handle313(const QString &prefix, const QList<QByteArray> &params) {
-  Q_UNUSED(prefix)
-  if(!checkParamCount("IrcServerHandler::handle313()", params, 1))
-    return;
-
-  IrcUser *ircuser = network()->ircUser(serverDecode(params[0]));
-  if(ircuser) {
-    ircuser->setIrcOperator(params.last());
-  }
-  emit displayMsg(Message::Server, BufferInfo::StatusBuffer, "", tr("[Whois] %1").arg(serverDecode(params).join(" ")));
-}
-
-/*  RPL_WHOWASUSER - "<nick> <user> <host> * :<real name>" */
-void IrcServerHandler::handle314(const QString &prefix, const QList<QByteArray> &params) {
-  Q_UNUSED(prefix)
-  if(!checkParamCount("IrcServerHandler::handle314()", params, 3))
-    return;
-
-  QString nick = serverDecode(params[0]);
-  QString hostmask = QString("%1@%2").arg(serverDecode(params[1])).arg(serverDecode(params[2]));
-  QString realName = serverDecode(params.last());
-  emit displayMsg(Message::Server, BufferInfo::StatusBuffer, "", tr("[Whowas] %1 was %2 (%3)").arg(nick).arg(hostmask).arg(realName));
-}
-
-/*  RPL_ENDOFWHO: "<name> :End of WHO list" */
-void IrcServerHandler::handle315(const QString &prefix, const QList<QByteArray> &params) {
-  Q_UNUSED(prefix);
-  if(!checkParamCount("IrcServerHandler::handle315()", params, 1))
-    return;
-
-  QStringList p = serverDecode(params);
-  if(network()->setAutoWhoDone(p[0])) {
-    return; // stay silent
-  }
-  p.takeLast(); // should be "End of WHO list"
-  emit displayMsg(Message::Server, BufferInfo::StatusBuffer, "", tr("[Who] End of /WHO list for %1").arg(p.join(" ")));
-}
-
-/*  RPL_WHOISIDLE - "<nick> <integer> :seconds idle"
-   (real life: "<nick> <integer> <integer> :seconds idle, signon time) */
-void IrcServerHandler::handle317(const QString &prefix, const QList<QByteArray> &params) {
-  Q_UNUSED(prefix);
-  if(!checkParamCount("IrcServerHandler::handle317()", params, 2))
-    return;
-
-  QString nick = serverDecode(params[0]);
-  IrcUser *ircuser = network()->ircUser(nick);
-
-  QDateTime now = QDateTime::currentDateTime();
-  int idleSecs = serverDecode(params[1]).toInt();
-  idleSecs *= -1;
-
-  if(ircuser) {
-    ircuser->setIdleTime(now.addSecs(idleSecs));
-    if(params.size() > 3) { // if we have more then 3 params we have the above mentioned "real life" situation
-      int loginTime = serverDecode(params[2]).toInt();
-      ircuser->setLoginTime(QDateTime::fromTime_t(loginTime));
-      emit displayMsg(Message::Server, BufferInfo::StatusBuffer, "", tr("[Whois] %1 is logged in since %2").arg(ircuser->nick()).arg(ircuser->loginTime().toString()));
-    }
-    emit displayMsg(Message::Server, BufferInfo::StatusBuffer, "", tr("[Whois] %1 is idling for %2 (%3)").arg(ircuser->nick()).arg(secondsToString(ircuser->idleTime().secsTo(now))).arg(ircuser->idleTime().toString()));
-  } else {
-    QDateTime idleSince = now.addSecs(idleSecs);
-    if (params.size() > 3) { // we have a signon time
-      int loginTime = serverDecode(params[2]).toInt();
-      QDateTime datetime = QDateTime::fromTime_t(loginTime);
-      emit displayMsg(Message::Server, BufferInfo::StatusBuffer, "", tr("[Whois] %1 is logged in since %2").arg(nick).arg(datetime.toString()));
-    }
-    emit displayMsg(Message::Server, BufferInfo::StatusBuffer, "", tr("[Whois] %1 is idling for %2 (%3)").arg(nick).arg(secondsToString(idleSince.secsTo(now))).arg(idleSince.toString()));
-  }
-}
-
-/*  RPL_ENDOFWHOIS - "<nick> :End of WHOIS list" */
-void IrcServerHandler::handle318(const QString &prefix, const QList<QByteArray> &params) {
-  Q_UNUSED(prefix)
-  _whois = false;
-  QStringList parameter = serverDecode(params);
-  parameter.removeFirst();
-  emit displayMsg(Message::Server, BufferInfo::StatusBuffer, "", tr("[Whois] %1").arg(parameter.join(" ")));
-}
-
-/*  RPL_WHOISCHANNELS - "<nick> :*( ( "@" / "+" ) <channel> " " )" */
-void IrcServerHandler::handle319(const QString &prefix, const QList<QByteArray> &params) {
-  Q_UNUSED(prefix)
-  if(!checkParamCount("IrcServerHandler::handle319()", params, 2))
-    return;
-
-  QString nick = serverDecode(params.first());
-  QStringList op;
-  QStringList voice;
-  QStringList user;
-  foreach (QString channel, serverDecode(params.last()).split(" ")) {
-    if(channel.startsWith("@"))
-       op.append(channel.remove(0,1));
-    else if(channel.startsWith("+"))
-      voice.append(channel.remove(0,1));
-    else
-      user.append(channel);
-  }
-  if(!user.isEmpty())
-    emit displayMsg(Message::Server, BufferInfo::StatusBuffer, "", tr("[Whois] %1 is a user on channels: %2").arg(nick).arg(user.join(" ")));
-  if(!voice.isEmpty())
-    emit displayMsg(Message::Server, BufferInfo::StatusBuffer, "", tr("[Whois] %1 has voice on channels: %2").arg(nick).arg(voice.join(" ")));
-  if(!op.isEmpty())
-    emit displayMsg(Message::Server, BufferInfo::StatusBuffer, "", tr("[Whois] %1 is an operator on channels: %2").arg(nick).arg(op.join(" ")));
-}
-
-/*  RPL_WHOISVIRT - "<nick> is identified to services" */
-void IrcServerHandler::handle320(const QString &prefix, const QList<QByteArray> &params) {
-  Q_UNUSED(prefix);
-  emit displayMsg(Message::Server, BufferInfo::StatusBuffer, "", tr("[Whois] %1").arg(serverDecode(params).join(" ")));
-}
-
 /* RPL_LIST -  "<channel> <# visible> :<topic>" */
 void IrcServerHandler::handle322(const QString &prefix, const QList<QByteArray> &params) {
   Q_UNUSED(prefix)
 /* RPL_LIST -  "<channel> <# visible> :<topic>" */
 void IrcServerHandler::handle322(const QString &prefix, const QList<QByteArray> &params) {
   Q_UNUSED(prefix)
@@ -688,18 +496,6 @@ 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 d7b8750..25ef895 100644 (file)
@@ -41,23 +41,11 @@ public slots:
   void handlePrivmsg(const QString &prefix, const QList<QByteArray> &params);
   void handleQuit(const QString &prefix, const QList<QByteArray> &params);
   void handle005(const QString &prefix, const QList<QByteArray> &params);   // RPL_ISUPPORT
   void handlePrivmsg(const QString &prefix, const QList<QByteArray> &params);
   void handleQuit(const QString &prefix, const QList<QByteArray> &params);
   void handle005(const QString &prefix, const QList<QByteArray> &params);   // RPL_ISUPPORT
-  void handle307(const QString &prefix, const QList<QByteArray> &params);   // RPL_WHOISSERVICE
-  void handle310(const QString &prefix, const QList<QByteArray> &params);   // RPL_SUSERHOST
-  void handle311(const QString &prefix, const QList<QByteArray> &params);   // RPL_WHOISUSER
-  void handle312(const QString &prefix, const QList<QByteArray> &params);   // RPL_WHOISSERVER
-  void handle313(const QString &prefix, const QList<QByteArray> &params);   // RPL_WHOISOPERATOR
-  void handle314(const QString &prefix, const QList<QByteArray> &params);   // RPL_WHOWASUSER
-  void handle315(const QString &prefix, const QList<QByteArray> &params);   // RPL_ENDOFWHO
-  void handle317(const QString &prefix, const QList<QByteArray> &params);   // RPL_WHOISIDLE
-  void handle318(const QString &prefix, const QList<QByteArray> &params);   // RPL_ENDOFWHOIS
-  void handle319(const QString &prefix, const QList<QByteArray> &params);   // RPL_WHOISCHANNELS
-  void handle320(const QString &prefix, const QList<QByteArray> &params);   // RPL_WHOISVIRT (is identified to services)
   void handle322(const QString &prefix, const QList<QByteArray> &params);   // RPL_LIST
   void handle323(const QString &prefix, const QList<QByteArray> &params);   // RPL_LISTEND
   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 handle322(const QString &prefix, const QList<QByteArray> &params);   // RPL_LIST
   void handle323(const QString &prefix, const QList<QByteArray> &params);   // RPL_LISTEND
   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...