X-Git-Url: https://git.quassel-irc.org/?a=blobdiff_plain;f=src%2Fcore%2Fcoresessioneventprocessor.cpp;h=220e6b127f708ef40d3ee24c86169c2f5faca99a;hb=0674fae039bbc79bfe3f7e42b12ec9015b9b879b;hp=02879807de0b8b9cad61aef544aba71af1d0ae2d;hpb=ec747d2e6065e645e2cd768abc84923ef6a19705;p=quassel.git diff --git a/src/core/coresessioneventprocessor.cpp b/src/core/coresessioneventprocessor.cpp index 02879807..220e6b12 100644 --- a/src/core/coresessioneventprocessor.cpp +++ b/src/core/coresessioneventprocessor.cpp @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2005-2019 by the Quassel Project * + * Copyright (C) 2005-2020 by the Quassel Project * * devel@quassel-irc.org * * * * This program is free software; you can redistribute it and/or modify * @@ -134,9 +134,7 @@ void CoreSessionEventProcessor::processIrcEventAuthenticate(IrcEvent* e) CoreNetwork* net = coreNetwork(e); -#ifdef HAVE_SSL if (net->identityPtr()->sslCert().isNull()) { -#endif QString construct = net->saslAccount(); construct.append(QChar(QChar::Null)); construct.append(net->saslAccount()); @@ -145,12 +143,10 @@ void CoreSessionEventProcessor::processIrcEventAuthenticate(IrcEvent* e) QByteArray saslData = QByteArray(construct.toLatin1().toBase64()); saslData.prepend("AUTHENTICATE "); net->putRawLine(saslData); -#ifdef HAVE_SSL } else { net->putRawLine("AUTHENTICATE +"); } -#endif } void CoreSessionEventProcessor::processIrcEventCap(IrcEvent* e) @@ -365,6 +361,10 @@ void CoreSessionEventProcessor::processIrcEventChghost(IrcEvent* e) } } +// IRCv3 INVITE - ": INVITE " +// 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)) { @@ -793,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 +// +// 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) {