]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/modules/m_cloaking.cpp
Fix segfault in m_chanprotect when OnAccessCheck is called with a null channel
[user/henk/code/inspircd.git] / src / modules / m_cloaking.cpp
index 77316a346b89a44b935d0d868f54a4bd58c60cc9..2fa3b9e6359618d294ea9b747ee97508c093e51a 100644 (file)
@@ -67,7 +67,7 @@ class CloakUser : public ModeHandler
        {
        }
 
-       ModeAction OnModeChange(User* source, User* dest, Channel* channel, std::string &parameter, bool adding, bool)
+       ModeAction OnModeChange(User* source, User* dest, Channel* channel, std::string &parameter, bool adding)
        {
                /* For remote clients, we dont take any action, we just allow it.
                 * The local server where they are will set their cloak instead.
@@ -307,7 +307,7 @@ class ModuleCloaking : public Module
                }
        }
 
-       virtual int OnCheckBan(User* user, Channel* chan)
+       virtual ModResult OnCheckBan(User* user, Channel* chan)
        {
                char mask[MAXBUF];
                std::string* tofree;
@@ -318,10 +318,10 @@ class ModuleCloaking : public Module
                        for (BanList::iterator i = chan->bans.begin(); i != chan->bans.end(); i++)
                        {
                                if (InspIRCd::Match(mask,i->data))
-                                       return -1;
+                                       return MOD_RES_DENY;
                        }
                }
-               return 0;
+               return MOD_RES_PASSTHRU;
        }
 
        void Prioritize()