From 8408139458e67b482a34d24e545fa19015a12224 Mon Sep 17 00:00:00 2001 From: Shane Synan Date: Wed, 17 Feb 2016 14:03:26 -0600 Subject: [PATCH] Add more sources of nick!user@host updates Update IrcUser user and hostname information from more sources. This is more important now since away-notify disables automatic WHO polling, so user@host information won't be updated if the server doesn't generate fake join/quit messages for /chghost and friends. In the future, IRCv3 capability chghost will remove the need for this once all servers support it. (In only a few decades, right..?) For chghost, see http://ircv3.net/specs/extensions/chghost-3.2.html --- src/core/ircparser.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/core/ircparser.cpp b/src/core/ircparser.cpp index bc10d93e..681346c1 100644 --- a/src/core/ircparser.cpp +++ b/src/core/ircparser.cpp @@ -180,6 +180,7 @@ void IrcParser::processNetworkIncoming(NetworkDataEvent *e) if (checkParamCount(cmd, params, 1)) { QString senderNick = nickFromMask(prefix); + net->updateNickFromMask(prefix); QByteArray msg = params.count() < 2 ? QByteArray() : params.at(1); QStringList targets = net->serverDecode(params.at(0)).split(',', QString::SkipEmptyParts); @@ -226,8 +227,10 @@ void IrcParser::processNetworkIncoming(NetworkDataEvent *e) else { if (!target.isEmpty() && net->prefixes().contains(target.at(0))) target = target.mid(1); - if (!net->isChannelName(target)) + if (!net->isChannelName(target)) { target = nickFromMask(prefix); + net->updateNickFromMask(prefix); + } } #ifdef HAVE_QCA2 @@ -256,12 +259,14 @@ void IrcParser::processNetworkIncoming(NetworkDataEvent *e) QString channel = net->serverDecode(params.at(0)); decParams << channel; decParams << net->userDecode(nickFromMask(prefix), params.at(1)); + net->updateNickFromMask(prefix); } break; case EventManager::IrcEventQuit: if (params.count() >= 1) { decParams << net->userDecode(nickFromMask(prefix), params.at(0)); + net->updateNickFromMask(prefix); } break; -- 2.20.1