diff options
-rw-r--r-- | include/cull_list.h | 2 | ||||
-rw-r--r-- | 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<CullItem> list; - char exempt[65535]; + std::map<userrec*,int> 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() |