diff options
| author | 2017-07-27 13:13:16 +0100 | |
|---|---|---|
| committer | 2017-07-27 13:13:16 +0100 | |
| commit | ff3b706b2506d7614bce5e54bc88657bd62ebd4d (patch) | |
| tree | dbfbe3df3df3668f0e1ac531229b4e15ff240754 /src/modules/m_repeat.cpp | |
| parent | Merge pull request #1300 from SaberUK/master+genssl (diff) | |
| parent | Move the OnCheckExemption hook out of the core. (diff) | |
Merge pull request #1271 from SaberUK/master+exemption
Move the OnCheckExemption hook out of the core.
Diffstat (limited to 'src/modules/m_repeat.cpp')
| -rw-r--r-- | src/modules/m_repeat.cpp | 12 |
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)) |
