cmake: avoid de-duplication of user's CXXFLAGS
[quassel.git] / src / core / coresessioneventprocessor.cpp
index ec988ff..c3dce75 100644 (file)
@@ -1,5 +1,5 @@
 /***************************************************************************
- *   Copyright (C) 2005-2020 by the Quassel Project                        *
+ *   Copyright (C) 2005-2022 by the Quassel Project                        *
  *   devel@quassel-irc.org                                                 *
  *                                                                         *
  *   This program is free software; you can redistribute it and/or modify  *
@@ -361,6 +361,10 @@ void CoreSessionEventProcessor::processIrcEventChghost(IrcEvent* e)
     }
 }
 
+// IRCv3 INVITE - ":<inviter> INVITE <target> <channel>"
+// Example:  :ChanServ!ChanServ@example.com INVITE Attila #channel
+//
+// See https://ircv3.net/specs/extensions/invite-notify-3.2
 void CoreSessionEventProcessor::processIrcEventInvite(IrcEvent* e)
 {
     if (checkParamCount(e, 2)) {
@@ -789,6 +793,25 @@ void CoreSessionEventProcessor::processIrcEventError(IrcEvent* e)
     }
 }
 
+
+// IRCv3 SETNAME - ":nick!user@host SETNAME :realname goes here"
+// Example:  :batman!~batman@bat.cave SETNAME :Bruce Wayne <bruce@wayne.enterprises>
+//
+// See https://ircv3.net/specs/extensions/setname
+void CoreSessionEventProcessor::processIrcEventSetname(IrcEvent* e)
+{
+    if (checkParamCount(e, 1)) {
+        IrcUser* ircuser = e->network()->updateNickFromMask(e->prefix());
+        if (!ircuser) {
+            qWarning() << Q_FUNC_INFO << "Unknown IrcUser!";
+            return;
+        }
+
+        QString newname = e->params().at(0);
+        ircuser->setRealName(newname);
+    }
+}
+
 #ifdef HAVE_QCA2
 void CoreSessionEventProcessor::processKeyEvent(KeyEvent* e)
 {
@@ -1174,7 +1197,7 @@ void CoreSessionEventProcessor::processIrcEvent353(IrcEvent* e)
         return;
 
     // param[0] is either "=", "*" or "@" indicating a public, private or secret channel
-    // we don't use this information at the time beeing
+    // we don't use this information at the time being
     QString channelname = e->params()[1];
 
     IrcChannel* channel = e->network()->ircChannel(channelname);
@@ -1358,7 +1381,7 @@ void CoreSessionEventProcessor::processIrcEvent432(IrcEventNumeric* e)
 
     QString errnick;
     if (e->params().count() < 2) {
-        // handle unreal-ircd bug, where unreal ircd doesnt supply a TARGET in ERR_ERRONEUSNICKNAME during registration phase:
+        // handle unreal-ircd bug, where unreal ircd doesn't supply a TARGET in ERR_ERRONEUSNICKNAME during registration phase:
         // nick @@@
         // :irc.scortum.moep.net 432  @@@ :Erroneous Nickname: Illegal characters
         // correct server reply: