]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/modules/m_channelban.cpp
Replace OnAccessCheck with OnPreMode to remove a number of redundant checks
[user/henk/code/inspircd.git] / src / modules / m_channelban.cpp
index eeb5c751dbbaf3f0f32721a72839da912ab58fee..727ab15a39b05c898df0f2eea86c09c7771ad4ff 100644 (file)
@@ -25,27 +25,27 @@ class ModuleBadChannelExtban : public Module
                ServerInstance->Modules->Attach(eventlist, this, 2);
        }
 
-       virtual ~ModuleBadChannelExtban()
+       ~ModuleBadChannelExtban()
        {
        }
 
-       virtual Version GetVersion()
+       Version GetVersion()
        {
                return Version("$Id$", VF_COMMON|VF_VENDOR,API_VERSION);
        }
 
-       virtual int OnCheckBan(User *user, Channel *c)
+       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)->name, 'j');
                }
 
                return rv;
        }
 
-       virtual void On005Numeric(std::string &output)
+       void On005Numeric(std::string &output)
        {
                ServerInstance->AddExtBanChar('j');
        }