From 81027f3a0888ac4c8e3fb6ea90081492defce946 Mon Sep 17 00:00:00 2001 From: Peter Powell Date: Mon, 20 Mar 2017 11:43:24 +0000 Subject: Move the OnCheckExemption hook out of the core. --- src/modules/m_repeat.cpp | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) (limited to 'src/modules/m_repeat.cpp') diff --git a/src/modules/m_repeat.cpp b/src/modules/m_repeat.cpp index 21bca0f3f..9715fcf6f 100644 --- a/src/modules/m_repeat.cpp +++ b/src/modules/m_repeat.cpp @@ -18,6 +18,7 @@ #include "inspircd.h" +#include "modules/exemption.h" class ChannelSettings { @@ -339,10 +340,15 @@ class RepeatMode : public ParamMode > class RepeatModule : public Module { + CheckExemption::EventProvider exemptionprov; RepeatMode rm; public: - RepeatModule() : rm(this) {} + RepeatModule() + : exemptionprov(this) + , rm(this) + { + } void ReadConfig(ConfigStatus& status) CXX11_OVERRIDE { @@ -363,7 +369,9 @@ class RepeatModule : public Module if (!memb) return MOD_RES_PASSTHRU; - if (ServerInstance->OnCheckExemption(user, chan, "repeat") == MOD_RES_ALLOW) + ModResult res; + FIRST_MOD_RESULT_CUSTOM(exemptionprov, CheckExemption::EventListener, OnCheckExemption, res, (user, chan, "repeat")); + if (res == MOD_RES_ALLOW) return MOD_RES_PASSTHRU; if (rm.MatchLine(memb, settings, text)) -- cgit v1.3.1-10-gc9f91