1 /* +------------------------------------+
2 * | Inspire Internet Relay Chat Daemon |
3 * +------------------------------------+
5 * InspIRCd: (C) 2002-2010 InspIRCd Development Team
6 * See: http://wiki.inspircd.org/Credits
8 * This program is free but copyrighted software; see
9 * the file COPYING for details.
11 * ---------------------------------------------------
17 void CullList::Apply()
19 std::vector<LocalUser *> working;
20 while (!SQlist.empty())
23 for(std::vector<LocalUser *>::iterator a = working.begin(); a != working.end(); a++)
26 ServerInstance->SNO->WriteGlobalSno('a', "User %s SendQ exceeds connect class maximum of %lu",
27 u->nick.c_str(), u->MyClass->GetSendqHardMax());
28 ServerInstance->Users->QuitUser(u, "SendQ exceeded");
32 std::set<classbase*> gone;
33 std::vector<classbase*> queue;
34 queue.reserve(list.size() + 32);
35 for(unsigned int i=0; i < list.size(); i++)
37 classbase* c = list[i];
38 if (gone.insert(c).second)
40 ServerInstance->Logs->Log("CULLLIST", DEBUG, "Deleting %s @%p", typeid(*c).name(),
47 ServerInstance->Logs->Log("CULLLIST",DEBUG, "WARNING: Object @%p culled twice!",
52 for(unsigned int i=0; i < queue.size(); i++)
54 classbase* c = queue[i];
59 ServerInstance->Logs->Log("CULLLIST",DEBUG, "WARNING: Objects added to cull list in a destructor");
64 void ActionList::Run()
66 for(unsigned int i=0; i < list.size(); i++)