]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/cull_list.cpp
Made it compile :p
[user/henk/code/inspircd.git] / src / cull_list.cpp
index a8188701a0114ebf11c7602d0dee8fb9df7fcb24..74400ef1badfc3881f71f597d6e12f7b04560fed 100644 (file)
@@ -87,12 +87,22 @@ CullItem::CullItem(userrec* u, std::string &r)
         this->reason = r;
 }
 
+CullItem::CullItem(userrec* u, const char* r)
+{
+       this->user = u;
+       this->reason = r;
+}
+
+CullItem::~CullItem()
+{
+}
+
 userrec* CullItem::GetUser()
 {
         return this->user;
 }
 
-std::string CullItem::GetReason()
+std::string& CullItem::GetReason()
 {
         return this->reason;
 }
@@ -113,6 +123,16 @@ void CullList::AddItem(userrec* user, std::string &reason)
        }
 }
 
+void CullList::AddItem(userrec* user, const char* reason)
+{
+       if (exempt.find(user) == exempt.end())
+       {
+               CullItem item(user,reason);
+               list.push_back(item);
+               exempt[user] = user->signon;
+       }
+}
+
 int CullList::Apply()
 {
         int n = 0;