+/* IRCv3 account-notify
+ * Log in: ":nick!user@host ACCOUNT accountname"
+ * Log out: ":nick!user@host ACCOUNT *" */
+void CoreSessionEventProcessor::processIrcEventAccount(IrcEvent *e)
+{
+ if (!checkParamCount(e, 1))
+ return;
+
+ IrcUser *ircuser = e->network()->updateNickFromMask(e->prefix());
+ if (ircuser) {
+ // FIXME Keep track of authed user account, requires adding support to ircuser.h/cpp
+ /*
+ if (e->params().at(0) != "*") {
+ // Account logged in
+ qDebug() << "account-notify:" << ircuser->nick() << "logged in to" << e->params().at(0);
+ } else {
+ // Account logged out
+ qDebug() << "account-notify:" << ircuser->nick() << "logged out";
+ }
+ */
+ } else {
+ qDebug() << "Received account-notify data for unknown user" << e->prefix();
+ }
+}
+
+/* IRCv3 away-notify - ":nick!user@host AWAY [:message]" */
+void CoreSessionEventProcessor::processIrcEventAway(IrcEvent *e)
+{
+ if (!checkParamCount(e, 2))
+ return;
+
+ // Nick is sent as part of parameters in order to split user/server decoding
+ IrcUser *ircuser = e->network()->ircUser(e->params().at(0));
+ if (ircuser) {
+ if (!e->params().at(1).isEmpty()) {
+ ircuser->setAway(true);
+ ircuser->setAwayMessage(e->params().at(1));
+ } else {
+ ircuser->setAway(false);
+ }
+ } else {
+ qDebug() << "Received away-notify data for unknown user" << e->params().at(0);
+ }
+}