IrcEventAccount,
IrcEventAway,
IrcEventCap,
+ IrcEventChghost,
IrcEventInvite,
IrcEventJoin,
IrcEventKick,
*/
const QString CAP_NOTIFY = "cap-notify";
+ /**
+ * Hostname/user changed notification.
+ *
+ * http://ircv3.net/specs/extensions/chghost-3.2.html
+ */
+ const QString CHGHOST = "chghost";
+
/**
* Extended join information.
*
ACCOUNT_NOTIFY,
AWAY_NOTIFY,
CAP_NOTIFY,
+ CHGHOST,
EXTENDED_JOIN,
MULTI_PREFIX,
SASL,
}
}
+/* IRCv3 chghost - ":nick!user@host CHGHOST newuser new.host.goes.here" */
+void CoreSessionEventProcessor::processIrcEventChghost(IrcEvent *e)
+{
+ if (!checkParamCount(e, 2))
+ return;
+
+ IrcUser *ircuser = e->network()->updateNickFromMask(e->prefix());
+ if (ircuser) {
+ // Update with new user/hostname information. setUser/setHost handles checking what
+ // actually changed.
+ ircuser->setUser(e->params().at(0));
+ ircuser->setHost(e->params().at(1));
+ } else {
+ qDebug() << "Received chghost data for unknown user" << e->prefix();
+ }
+}
+
void CoreSessionEventProcessor::processIrcEventInvite(IrcEvent *e)
{
if (checkParamCount(e, 2)) {
Q_INVOKABLE void processIrcEventCap(IrcEvent *event); /// CAP framework negotiation
Q_INVOKABLE void processIrcEventAccount(IrcEvent *event); /// account-notify received
Q_INVOKABLE void processIrcEventAway(IrcEvent *event); /// away-notify received
+ Q_INVOKABLE void processIrcEventChghost(IrcEvent *event); /// chghost received
Q_INVOKABLE void processIrcEventInvite(IrcEvent *event);
Q_INVOKABLE void processIrcEventJoin(IrcEvent *event);
Q_INVOKABLE void lateProcessIrcEventKick(IrcEvent *event);