]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/cull_list.cpp
Hooray unused variables. Thanks MSVC.
[user/henk/code/inspircd.git] / src / cull_list.cpp
index 2b6e4578c619578311aea1363f9a73cd95e9d911..07649ed819b173240c1563bb107e7273506295ec 100644 (file)
@@ -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<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);
 
@@ -114,9 +108,7 @@ int CullList::Apply()
                }
 
                delete u;
-               list.erase(list.begin());
        }
-
-       return n;
+       list.clear();
 }