From 58ab072505fcc58e35799065c42fb7112c4aed3f Mon Sep 17 00:00:00 2001 From: Jackmcbarn Date: Mon, 23 May 2011 21:51:08 -0400 Subject: Fix recursion of QuitUser in SendQ quits --- src/cull_list.cpp | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'src/cull_list.cpp') 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 working; + while (!SQlist.empty()) + { + working.swap(SQlist); + for(std::vector::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 gone; std::vector queue; queue.reserve(list.size() + 32); -- cgit v1.3.1-10-gc9f91