X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;f=src%2Fcull_list.cpp;h=07649ed819b173240c1563bb107e7273506295ec;hb=16b8e22615e6b3351b47d13e0540600fa590d0cb;hp=2b6e4578c619578311aea1363f9a73cd95e9d911;hpb=b6dbd6caab62bc2c0d11ce5a45d511611eb9c2ef;p=user%2Fhenk%2Fcode%2Finspircd.git diff --git a/src/cull_list.cpp b/src/cull_list.cpp index 2b6e4578c..07649ed81 100644 --- a/src/cull_list.cpp +++ b/src/cull_list.cpp @@ -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(); }