summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--include/cull_list.h3
-rw-r--r--src/cull_list.cpp15
2 files changed, 5 insertions, 13 deletions
diff --git a/include/cull_list.h b/include/cull_list.h
index 3a78bf96d..2a0b895f2 100644
--- a/include/cull_list.h
+++ b/include/cull_list.h
@@ -66,9 +66,8 @@ class CoreExport CullList : public classbase
* iterating the user list and comparing each one,
* especially if there are multiple comparisons
* to be done, or recursion.
- * @returns The number of users removed from IRC.
*/
- int Apply();
+ void Apply();
};
#endif
diff --git a/src/cull_list.cpp b/src/cull_list.cpp
index a1881fe3d..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,15 +31,11 @@ void CullList::MakeSilent(User* user)
return;
}
-int CullList::Apply()
+void CullList::Apply()
{
- int n = list.size();
-
- while (list.size())
+ 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);
@@ -113,9 +108,7 @@ int CullList::Apply()
}
delete u;
- list.erase(list.begin());
}
-
- return n;
+ list.clear();
}