]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/modules/m_nonotice.cpp
Fix a broken distro constraint in the m_ssl_gnutls PackageInfo.
[user/henk/code/inspircd.git] / src / modules / m_nonotice.cpp
index cab367ad9e6abe49e879a275911a1feb79d57c3a..ec5be951735ad68231ec059d1f62c8d48eb186b3 100644 (file)
@@ -20,6 +20,7 @@
 
 
 #include "inspircd.h"
+#include "modules/exemption.h"
 
 class NoNotice : public SimpleChannelModeHandler
 {
@@ -29,11 +30,13 @@ class NoNotice : public SimpleChannelModeHandler
 
 class ModuleNoNotice : public Module
 {
+       CheckExemption::EventProvider exemptionprov;
        NoNotice nt;
  public:
 
        ModuleNoNotice()
-               : nt(this)
+               : exemptionprov(this)
+               , nt(this)
        {
        }
 
@@ -50,12 +53,12 @@ class ModuleNoNotice : public Module
                        Channel* c = (Channel*)dest;
                        if (!c->GetExtBanStatus(user, 'T').check(!c->IsModeSet(nt)))
                        {
-                               res = ServerInstance->OnCheckExemption(user,c,"nonotice");
+                               FIRST_MOD_RESULT_CUSTOM(exemptionprov, CheckExemption::EventListener, OnCheckExemption, res, (user, c, "nonotice"));
                                if (res == MOD_RES_ALLOW)
                                        return MOD_RES_PASSTHRU;
                                else
                                {
-                                       user->WriteNumeric(ERR_CANNOTSENDTOCHAN, "%s :Can't send NOTICE to channel (+T set)", c->name.c_str());
+                                       user->WriteNumeric(ERR_CANNOTSENDTOCHAN, c->name, "Can't send NOTICE to channel (+T set)");
                                        return MOD_RES_DENY;
                                }
                        }