]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/cull_list.cpp
Remove bad check for channel op in m_auditorium, fixes bug #886
[user/henk/code/inspircd.git] / src / cull_list.cpp
index 95301f3e2d88a20684432abcdcefe3f27d256087..07649ed819b173240c1563bb107e7273506295ec 100644 (file)
@@ -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<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();
 }