summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2005-12-15 10:54:42 +0000
committerbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2005-12-15 10:54:42 +0000
commit9904b03fdd72f357729103774a7f4bba6ec3b0bc (patch)
tree7a271f3573f25886bf0981e5f58fcef098c41067
parentb862c003be4eef476b10b6bee17edfc06b74de24 (diff)
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
-rw-r--r--include/cull_list.h2
-rw-r--r--src/cull_list.cpp12
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()