X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;f=src%2Fmodules%2Fm_noctcp.cpp;h=e9733cf543699ef4730fde4d663f32ad6851a408;hb=565544fac966b14e046bb3042ab485f79bcf7c9e;hp=49b53ee950f93af1eccfc93fede8f4f96b0e51e8;hpb=da29af8cba49d51e53d6e68237ccbf6370b6dd1f;p=user%2Fhenk%2Fcode%2Finspircd.git diff --git a/src/modules/m_noctcp.cpp b/src/modules/m_noctcp.cpp index 49b53ee95..e9733cf54 100644 --- a/src/modules/m_noctcp.cpp +++ b/src/modules/m_noctcp.cpp @@ -20,20 +20,17 @@ #include "inspircd.h" - -class NoCTCP : public SimpleChannelModeHandler -{ - public: - NoCTCP(Module* Creator) : SimpleChannelModeHandler(Creator, "noctcp", 'C') { } -}; +#include "modules/exemption.h" class ModuleNoCTCP : public Module { - NoCTCP nc; + CheckExemption::EventProvider exemptionprov; + SimpleChannelModeHandler nc; public: ModuleNoCTCP() - : nc(this) + : exemptionprov(this) + , nc(this, "noctcp", 'C') { } @@ -47,10 +44,10 @@ class ModuleNoCTCP : public Module if ((target_type == TYPE_CHANNEL) && (IS_LOCAL(user))) { Channel* c = (Channel*)dest; - if ((text.empty()) || (text[0] != '\001') || (!strncmp(text.c_str(),"\1ACTION ",8))) + if ((text.empty()) || (text[0] != '\001') || (!strncmp(text.c_str(),"\1ACTION ", 8)) || (text == "\1ACTION\1") || (text == "\1ACTION")) return MOD_RES_PASSTHRU; - ModResult res = ServerInstance->OnCheckExemption(user,c,"noctcp"); + ModResult res = CheckExemption::Call(exemptionprov, user, c, "noctcp"); if (res == MOD_RES_ALLOW) return MOD_RES_PASSTHRU;