]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/modules/m_nonotice.cpp
Move OnSync{Channel,Network,User} to ServerEventListener.
[user/henk/code/inspircd.git] / src / modules / m_nonotice.cpp
index 3d6d0bb099422808e9f8af07c8fe385e50fbc2db..d7ea32d2f7b5b5ebaab03d62f73a5d6192aac8d4 100644 (file)
 
 
 #include "inspircd.h"
-
-class NoNotice : public SimpleChannelModeHandler
-{
- public:
-       NoNotice(Module* Creator) : SimpleChannelModeHandler(Creator, "nonotice", 'T') { }
-};
+#include "modules/exemption.h"
 
 class ModuleNoNotice : public Module
 {
-       NoNotice nt;
+       CheckExemption::EventProvider exemptionprov;
+       SimpleChannelModeHandler nt;
  public:
 
        ModuleNoNotice()
-               : nt(this)
+               : exemptionprov(this)
+               , nt(this, "nonotice", 'T')
        {
        }
 
@@ -50,7 +47,7 @@ class ModuleNoNotice : public Module
                        Channel* c = (Channel*)dest;
                        if (!c->GetExtBanStatus(user, 'T').check(!c->IsModeSet(nt)))
                        {
-                               res = ServerInstance->OnCheckExemption(user,c,"nonotice");
+                               res = CheckExemption::Call(exemptionprov, user, c, "nonotice");
                                if (res == MOD_RES_ALLOW)
                                        return MOD_RES_PASSTHRU;
                                else