]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/modules/m_channelban.cpp
Fix segfault in m_chanprotect when OnAccessCheck is called with a null channel
[user/henk/code/inspircd.git] / src / modules / m_channelban.cpp
index 8caae0a961bada8281296af786d1c27617f90cb7..8167b8aae724aed831a1af1789a523cc93e03a12 100644 (file)
@@ -3,7 +3,7 @@
  *       +------------------------------------+
  *
  *  InspIRCd: (C) 2002-2009 InspIRCd Development Team
- * See: http://www.inspircd.org/wiki/index.php/Credits
+ * See: http://wiki.inspircd.org/Credits
  *
  * This program is free but copyrighted software; see
  *            the file COPYING for details.
@@ -34,12 +34,12 @@ class ModuleBadChannelExtban : public Module
                return Version("$Id$", VF_COMMON|VF_VENDOR,API_VERSION);
        }
 
-       virtual int OnCheckBan(User *user, Channel *c)
+       virtual ModResult OnCheckBan(User *user, Channel *c)
        {
-               int rv = 0;
+               ModResult rv;
                for (UCListIter i = user->chans.begin(); i != user->chans.end(); i++)
                {
-                       rv = banmatch_reduce(rv, c->GetExtBanStatus(i->first->name, 'j'));
+                       rv = rv + c->GetExtBanStatus(i->first->name, 'j');
                }
 
                return rv;