CullList::CullList(InspIRCd* Instance) : ServerInstance(Instance)
{
- list.clear();
}
void CullList::AddItem(User* user)
return;
}
-int CullList::Apply()
+void CullList::Apply()
{
- int n = list.size();
- int i = 0;
-
- while (list.size() && i++ != 100)
+ for(std::vector<User *>::iterator a = list.begin(); a != list.end(); a++)
{
- std::vector<User *>::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);
}
delete u;
- list.erase(list.begin());
}
-
- return n;
+ list.clear();
}