diff options
author | Jackmcbarn <jackmcbarn@jackmcbarn.no-ip.org> | 2011-05-23 21:51:08 -0400 |
---|---|---|
committer | Jackmcbarn <jackmcbarn@jackmcbarn.no-ip.org> | 2011-05-23 21:51:08 -0400 |
commit | 58ab072505fcc58e35799065c42fb7112c4aed3f (patch) | |
tree | 793f7ab5305c7a2fe56ab7ca36bd8705695323a0 /src/cull_list.cpp | |
parent | f5409f04cd9fdb99cf4484785a2b14628464b538 (diff) |
Fix recursion of QuitUser in SendQ quits
Diffstat (limited to 'src/cull_list.cpp')
-rw-r--r-- | src/cull_list.cpp | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/src/cull_list.cpp b/src/cull_list.cpp index 4f70ca466..d1b7ddc9f 100644 --- a/src/cull_list.cpp +++ b/src/cull_list.cpp @@ -16,6 +16,19 @@ void CullList::Apply() { + std::vector<LocalUser *> working; + while (!SQlist.empty()) + { + working.swap(SQlist); + for(std::vector<LocalUser *>::iterator a = working.begin(); a != working.end(); a++) + { + LocalUser *u = *a; + ServerInstance->SNO->WriteGlobalSno('a', "User %s SendQ exceeds connect class maximum of %lu", + u->nick.c_str(), u->MyClass->GetSendqHardMax()); + ServerInstance->Users->QuitUser(u, "SendQ exceeded"); + } + working.clear(); + } std::set<classbase*> gone; std::vector<classbase*> queue; queue.reserve(list.size() + 32); |