From ec1df83c875bb783ca660a1fec700983fe1d9266 Mon Sep 17 00:00:00 2001 From: danieldg Date: Mon, 12 Oct 2009 18:13:01 +0000 Subject: 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 --- src/users.cpp | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) (limited to 'src') 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) -- cgit v1.2.3