From 9904b03fdd72f357729103774a7f4bba6ec3b0bc Mon Sep 17 00:00:00 2001 From: brain Date: Thu, 15 Dec 2005 10:54:42 +0000 Subject: Fixed to allow remote users to be put on a cull list git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@2462 e03df62e-2008-0410-955e-edbf42e46eb7 --- include/cull_list.h | 2 +- src/cull_list.cpp | 12 ++++++------ 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/include/cull_list.h b/include/cull_list.h index eb76f3797..113a0cd61 100644 --- a/include/cull_list.h +++ b/include/cull_list.h @@ -44,7 +44,7 @@ class CullList { private: std::vector list; - char exempt[65535]; + std::map exempt; public: CullList(); void AddItem(userrec* user, std::string reason); diff --git a/src/cull_list.cpp b/src/cull_list.cpp index d931b567c..e9e4c4c70 100644 --- a/src/cull_list.cpp +++ b/src/cull_list.cpp @@ -73,12 +73,12 @@ CullList::CullList() 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() -- cgit v1.2.3