X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;f=src%2Fmodules%2Fm_nonotice.cpp;h=ec5be951735ad68231ec059d1f62c8d48eb186b3;hb=9de9231380d42955a13f07d7843897c77af704e4;hp=cab367ad9e6abe49e879a275911a1feb79d57c3a;hpb=6c7a3ceb6c674a9af09da955ee0238e9291cf29a;p=user%2Fhenk%2Fcode%2Finspircd.git diff --git a/src/modules/m_nonotice.cpp b/src/modules/m_nonotice.cpp index cab367ad9..ec5be9517 100644 --- a/src/modules/m_nonotice.cpp +++ b/src/modules/m_nonotice.cpp @@ -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; } }