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_nickflood.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_nickflood.cpp')
-rw-r--r-- | src/modules/m_nickflood.cpp | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/src/modules/m_nickflood.cpp b/src/modules/m_nickflood.cpp index abb3cdfaf..a4a87f691 100644 --- a/src/modules/m_nickflood.cpp +++ b/src/modules/m_nickflood.cpp @@ -19,6 +19,7 @@ #include "inspircd.h" +#include "modules/exemption.h" // The number of seconds nickname changing will be blocked for. static unsigned int duration; @@ -121,11 +122,13 @@ class NickFlood : public ParamMode<NickFlood, SimpleExtItem<nickfloodsettings> > class ModuleNickFlood : public Module { + CheckExemption::EventProvider exemptionprov; NickFlood nf; public: ModuleNickFlood() - : nf(this) + : exemptionprov(this) + , nf(this) { } @@ -145,7 +148,7 @@ class ModuleNickFlood : public Module nickfloodsettings *f = nf.ext.get(channel); if (f) { - res = ServerInstance->OnCheckExemption(user,channel,"nickflood"); + FIRST_MOD_RESULT_CUSTOM(exemptionprov, CheckExemption::EventListener, OnCheckExemption, res, (user, channel, "nickflood")); if (res == MOD_RES_ALLOW) continue; @@ -184,7 +187,7 @@ class ModuleNickFlood : public Module nickfloodsettings *f = nf.ext.get(channel); if (f) { - res = ServerInstance->OnCheckExemption(user,channel,"nickflood"); + FIRST_MOD_RESULT_CUSTOM(exemptionprov, CheckExemption::EventListener, OnCheckExemption, res, (user, channel, "nickflood")); if (res == MOD_RES_ALLOW) return; |