]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/cull_list.cpp
Decide that it wasn't quite appropriate :(
[user/henk/code/inspircd.git] / src / cull_list.cpp
index d931b567c2b7e38efc97074d424051f7ac387225..5a589b144efcfe8ee67dd2330473de1758a12cc5 100644 (file)
@@ -2,7 +2,7 @@
  *       | Inspire Internet Relay Chat Daemon |
  *       +------------------------------------+
  *
- *  Inspire is copyright (C) 2002-2005 ChatSpike-Dev.
+ *  InspIRCd is copyright (C) 2002-2006 ChatSpike-Dev.
  *                       E-mail:
  *                <brain@chatspike.net>
  *                <Craig@chatspike.net>
@@ -19,7 +19,6 @@ using namespace std;
 #include "inspircd_config.h"
 #include "inspircd.h"
 #include "inspircd_io.h"
-#include "inspircd_util.h"
 #include <unistd.h>
 #include <fcntl.h>
 #include <sys/errno.h>
@@ -68,17 +67,17 @@ std::string CullItem::GetReason()
 CullList::CullList()
 {
        list.clear();
-        memset(exempt,0,65535);
+        exempt.clear();
 }
 
 void CullList::AddItem(userrec* user, std::string reason)
 {
-        if ((user->fd > -1) && (exempt[user->fd] == 0))
-        {
-                CullItem item(user,reason);
-                list.push_back(item);
-                exempt[user->fd] = 1;
-        }
+       if (exempt.find(user) == exempt.end())
+       {
+               CullItem item(user,reason);
+               list.push_back(item);
+               exempt[user] = 1;
+       }
 }
 
 int CullList::Apply()