aboutsummaryrefslogtreecommitdiffstats
path: root/src/modules/m_repeat.cpp
diff options
context:
space:
mode:
authorGravatar Peter Powell2017-03-20 11:43:24 +0000
committerGravatar Peter Powell2017-03-20 11:47:59 +0000
commit81027f3a0888ac4c8e3fb6ea90081492defce946 (patch)
treea8da074f8feb486af8ef4aebf67e8c901f2340f3 /src/modules/m_repeat.cpp
parentMerge pull request #1292 from SaberUK/master+flush (diff)
downloadinspircd++-81027f3a0888ac4c8e3fb6ea90081492defce946.tar.gz
inspircd++-81027f3a0888ac4c8e3fb6ea90081492defce946.tar.bz2
inspircd++-81027f3a0888ac4c8e3fb6ea90081492defce946.zip
Move the OnCheckExemption hook out of the core.
Diffstat (limited to 'src/modules/m_repeat.cpp')
-rw-r--r--src/modules/m_repeat.cpp12
1 files changed, 10 insertions, 2 deletions
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<RepeatMode, SimpleExtItem<ChannelSettings> >
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))