]> 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 43f73bfe00f522f8bfb6a70dca51c2e0667a7426..2fa3b9e6359618d294ea9b747ee97508c093e51a 100644 (file)
@@ -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()