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_auditorium.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_auditorium.cpp')
| -rw-r--r-- | src/modules/m_auditorium.cpp | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/src/modules/m_auditorium.cpp b/src/modules/m_auditorium.cpp index 6f9eeb252..cd257eff3 100644 --- a/src/modules/m_auditorium.cpp +++ b/src/modules/m_auditorium.cpp @@ -21,6 +21,7 @@ #include "inspircd.h" +#include "modules/exemption.h" class AuditoriumMode : public SimpleChannelModeHandler { @@ -33,13 +34,16 @@ class AuditoriumMode : public SimpleChannelModeHandler class ModuleAuditorium : public Module { + CheckExemption::EventProvider exemptionprov; AuditoriumMode aum; bool OpsVisible; bool OpsCanSee; bool OperCanSee; public: - ModuleAuditorium() : aum(this) + ModuleAuditorium() + : exemptionprov(this) + , aum(this) { } @@ -62,7 +66,8 @@ class ModuleAuditorium : public Module if (!memb->chan->IsModeSet(&aum)) return true; - ModResult res = ServerInstance->OnCheckExemption(memb->user, memb->chan, "auditorium-vis"); + ModResult res; + FIRST_MOD_RESULT_CUSTOM(exemptionprov, CheckExemption::EventListener, OnCheckExemption, res, (memb->user, memb->chan, "auditorium-vis")); return res.check(OpsVisible && memb->getRank() >= OP_VALUE); } @@ -78,7 +83,8 @@ class ModuleAuditorium : public Module return true; // Can you see the list by permission? - ModResult res = ServerInstance->OnCheckExemption(issuer,memb->chan,"auditorium-see"); + ModResult res; + FIRST_MOD_RESULT_CUSTOM(exemptionprov, CheckExemption::EventListener, OnCheckExemption, res, (issuer, memb->chan, "auditorium-see")); if (res.check(OpsCanSee && memb->chan->GetPrefixValue(issuer) >= OP_VALUE)) return true; |
