diff options
author | Peter Powell <petpow@saberuk.com> | 2017-07-27 13:13:16 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-07-27 13:13:16 +0100 |
commit | ff3b706b2506d7614bce5e54bc88657bd62ebd4d (patch) | |
tree | dbfbe3df3df3668f0e1ac531229b4e15ff240754 /src/modules/m_noctcp.cpp | |
parent | bb4aa10ed82612624da45d0c9592ddf7f2f51ab5 (diff) | |
parent | 81027f3a0888ac4c8e3fb6ea90081492defce946 (diff) |
Merge pull request #1271 from SaberUK/master+exemption
Move the OnCheckExemption hook out of the core.
Diffstat (limited to 'src/modules/m_noctcp.cpp')
-rw-r--r-- | src/modules/m_noctcp.cpp | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/modules/m_noctcp.cpp b/src/modules/m_noctcp.cpp index 49b53ee95..9dd9bf852 100644 --- a/src/modules/m_noctcp.cpp +++ b/src/modules/m_noctcp.cpp @@ -20,6 +20,7 @@ #include "inspircd.h" +#include "modules/exemption.h" class NoCTCP : public SimpleChannelModeHandler { @@ -29,11 +30,13 @@ class NoCTCP : public SimpleChannelModeHandler class ModuleNoCTCP : public Module { + CheckExemption::EventProvider exemptionprov; NoCTCP nc; public: ModuleNoCTCP() - : nc(this) + : exemptionprov(this) + , nc(this) { } @@ -50,7 +53,8 @@ class ModuleNoCTCP : public Module if ((text.empty()) || (text[0] != '\001') || (!strncmp(text.c_str(),"\1ACTION ",8))) return MOD_RES_PASSTHRU; - ModResult res = ServerInstance->OnCheckExemption(user,c,"noctcp"); + ModResult res; + FIRST_MOD_RESULT_CUSTOM(exemptionprov, CheckExemption::EventListener, OnCheckExemption, res, (user, c, "noctcp")); if (res == MOD_RES_ALLOW) return MOD_RES_PASSTHRU; |