X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;f=src%2Fcull_list.cpp;h=07649ed819b173240c1563bb107e7273506295ec;hb=6eeecaada5818d8dc1f3bb98c3e0916d195e3592;hp=95301f3e2d88a20684432abcdcefe3f27d256087;hpb=875b54b33c2063378aaefae58d70a99656e1bf24;p=user%2Fhenk%2Fcode%2Finspircd.git diff --git a/src/cull_list.cpp b/src/cull_list.cpp index 95301f3e2..07649ed81 100644 --- a/src/cull_list.cpp +++ b/src/cull_list.cpp @@ -3,7 +3,7 @@ * +------------------------------------+ * * InspIRCd: (C) 2002-2009 InspIRCd Development Team - * See: http://www.inspircd.org/wiki/index.php/Credits + * See: http://wiki.inspircd.org/Credits * * This program is free but copyrighted software; see * the file COPYING for details. @@ -18,7 +18,6 @@ CullList::CullList(InspIRCd* Instance) : ServerInstance(Instance) { - list.clear(); } void CullList::AddItem(User* user) @@ -32,16 +31,11 @@ void CullList::MakeSilent(User* user) return; } -int CullList::Apply() +void CullList::Apply() { - int n = list.size(); - int i = 0; - - while (list.size() && i++ != 100) + for(std::vector::iterator a = list.begin(); a != list.end(); a++) { - std::vector::iterator a = list.begin(); - - User *u = (*a); + User *u = *a; // user has been moved onto their UID; that's why this isn't find(u->nick) user_hash::iterator iter = ServerInstance->Users->clientlist->find(u->uuid); @@ -114,9 +108,7 @@ int CullList::Apply() } delete u; - list.erase(list.begin()); } - - return n; + list.clear(); }