+/* RPL_WHOISOPERATOR - "<nick> :is an IRC operator" */
+void IrcServerHandler::handle313(QString prefix, QList<QByteArray> params) {
+ Q_UNUSED(prefix)
+ IrcUser *ircuser = network()->ircUser(serverDecode(params[0]));
+ if(ircuser) {
+ ircuser->setIrcOperator(params.last());
+ }
+ emit displayMsg(Message::Server, "", tr("[Whois] %1").arg(serverDecode(params).join(" ")));
+}
+
+/* RPL_WHOWASUSER - "<nick> <user> <host> * :<real name>" */
+void IrcServerHandler::handle314(QString prefix, QList<QByteArray> params) {
+ Q_UNUSED(prefix)
+ emit displayMsg(Message::Server, "", tr("[Whowas] %1").arg(serverDecode(params).join(" ")));
+}
+
+/* RPL_ENDOFWHO: "<name> :End of WHO list" */
+void IrcServerHandler::handle315(QString prefix, QList<QByteArray> params) {
+ Q_UNUSED(prefix)
+ emit displayMsg(Message::Server, "", tr("[Who] %1").arg(serverDecode(params).join(" ")));
+}
+
+/* RPL_WHOISIDLE - "<nick> <integer> :seconds idle"
+ (real life: "<nick> <integer> <integer> :seconds idle, signon time) */
+ //TODO: parse real life message
+void IrcServerHandler::handle317(QString prefix, QList<QByteArray> params) {
+ Q_UNUSED(prefix)
+ IrcUser *ircuser = network()->ircUser(serverDecode(params[0]));
+ if(ircuser) {
+ QDateTime now = QDateTime::currentDateTime();
+ int idleSecs = serverDecode(params[1]).toInt();
+ idleSecs *= -1;
+ ircuser->setIdleTime(now.addSecs(idleSecs));
+ emit displayMsg(Message::Server, "", tr("[Whois] %1 is idling for %2 seconds").arg(ircuser->nick()).arg(ircuser->idleTime().secsTo(now)));
+ } else {
+ emit displayMsg(Message::Server, "", tr("[Whois] idle message: %1").arg(serverDecode(params).join(" ")));
+ }
+}
+
+/* RPL_ENDOFWHOIS - "<nick> :End of WHOIS list" */
+void IrcServerHandler::handle318(QString prefix, QList<QByteArray> params) {
+ Q_UNUSED(prefix)
+ _whois = false;
+ emit displayMsg(Message::Server, "", tr("[Whois] %1").arg(serverDecode(params).join(" ")));
+}
+
+/* RPL_WHOISCHANNELS - "<nick> :*( ( "@" / "+" ) <channel> " " )" */
+void IrcServerHandler::handle319(QString prefix, QList<QByteArray> params) {