summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAttila Molnar <attilamolnar@hush.com>2016-12-05 11:37:08 +0100
committerAttila Molnar <attilamolnar@hush.com>2016-12-05 11:37:08 +0100
commitc165759fbe0dc1c1632cd5369dd1550f28f45a3b (patch)
treec9b22322e633f6acafaf60df94d9c2b0d142e8a6
parent6423687d1a9e78eb4d90e689ffe8e2d6faeda386 (diff)
Fix users receiving a QUIT with themselves as source when host cycling in certain cases
The OnBuildNeighborList handler in m_auditorium can add the cycling user to the exceptions as an always send exception. To fix, remove the user from the exceptions before processing them. Reported by @genius3000 on IRC
-rw-r--r--src/users.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/users.cpp b/src/users.cpp
index 418f2c9aa..af0e15f65 100644
--- a/src/users.cpp
+++ b/src/users.cpp
@@ -1398,6 +1398,8 @@ void User::DoHostCycle(const std::string &quitline)
FOREACH_MOD(I_OnBuildNeighborList,OnBuildNeighborList(this, include_c, exceptions));
+ // Users shouldn't see themselves quitting when host cycling
+ exceptions.erase(this);
for (std::map<User*,bool>::iterator i = exceptions.begin(); i != exceptions.end(); ++i)
{
LocalUser* u = IS_LOCAL(i->first);