diff options
author | Peter Powell <petpow@saberuk.com> | 2017-03-20 11:43:24 +0000 |
---|---|---|
committer | Peter Powell <petpow@saberuk.com> | 2017-03-20 11:47:59 +0000 |
commit | 81027f3a0888ac4c8e3fb6ea90081492defce946 (patch) | |
tree | a8da074f8feb486af8ef4aebf67e8c901f2340f3 /src/modules/m_blockcaps.cpp | |
parent | 5583d8dc5ff202d411d7985b6bbfb240beeacddd (diff) |
Move the OnCheckExemption hook out of the core.
Diffstat (limited to 'src/modules/m_blockcaps.cpp')
-rw-r--r-- | src/modules/m_blockcaps.cpp | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/src/modules/m_blockcaps.cpp b/src/modules/m_blockcaps.cpp index cd7698d69..6e67cb309 100644 --- a/src/modules/m_blockcaps.cpp +++ b/src/modules/m_blockcaps.cpp @@ -21,6 +21,7 @@ #include "inspircd.h" +#include "modules/exemption.h" /** Handles the +B channel mode @@ -33,13 +34,16 @@ class BlockCaps : public SimpleChannelModeHandler class ModuleBlockCAPS : public Module { + CheckExemption::EventProvider exemptionprov; BlockCaps bc; unsigned int percent; unsigned int minlen; char capsmap[256]; public: - ModuleBlockCAPS() : bc(this) + ModuleBlockCAPS() + : exemptionprov(this) + , bc(this) { } @@ -56,7 +60,8 @@ public: return MOD_RES_PASSTHRU; Channel* c = (Channel*)dest; - ModResult res = ServerInstance->OnCheckExemption(user,c,"blockcaps"); + ModResult res; + FIRST_MOD_RESULT_CUSTOM(exemptionprov, CheckExemption::EventListener, OnCheckExemption, res, (user, c, "blockcaps")); if (res == MOD_RES_ALLOW) return MOD_RES_PASSTHRU; |