diff options
author | danieldg <danieldg@e03df62e-2008-0410-955e-edbf42e46eb7> | 2009-10-12 18:13:01 +0000 |
---|---|---|
committer | danieldg <danieldg@e03df62e-2008-0410-955e-edbf42e46eb7> | 2009-10-12 18:13:01 +0000 |
commit | ec1df83c875bb783ca660a1fec700983fe1d9266 (patch) | |
tree | 99584d92f4a6053623fd4ab79490d9707cbaf495 /src | |
parent | 579e707f017ca237d260165992f0b72bafba152c (diff) |
CoreExport changes, clean up DoHostCycle when users are exempted
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@11856 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src')
-rw-r--r-- | src/users.cpp | 17 |
1 files changed, 13 insertions, 4 deletions
diff --git a/src/users.cpp b/src/users.cpp index 1cf21a029..370387df6 100644 --- a/src/users.cpp +++ b/src/users.cpp @@ -1401,7 +1401,8 @@ void User::DoHostCycle(const std::string &quitline) if (!ServerInstance->Config->CycleHosts) return; - uniq_id++; + int silent_id = ++uniq_id; + int seen_id = ++uniq_id; if (!already_sent) InitializeAlreadySent(ServerInstance->SE); @@ -1416,9 +1417,15 @@ void User::DoHostCycle(const std::string &quitline) User* u = i->first; if (IS_LOCAL(u) && !u->quitting) { - already_sent[u->fd] = uniq_id; if (i->second) + { + already_sent[u->fd] = seen_id; u->Write(quitline); + } + else + { + already_sent[u->fd] = silent_id; + } } } for (UCListIter v = include_c.begin(); v != include_c.end(); ++v) @@ -1439,11 +1446,13 @@ void User::DoHostCycle(const std::string &quitline) User* u = i->first; if (u == this || !IS_LOCAL(u)) continue; + if (already_sent[u->fd] == silent_id) + continue; - if (already_sent[i->first->fd] != uniq_id) + if (already_sent[u->fd] != seen_id) { u->Write(quitline); - already_sent[i->first->fd] = uniq_id; + already_sent[i->first->fd] = seen_id; } u->Write(joinline); if (modeline.length() > 0) |