#include "inspircd.h"
+#include "modules/exemption.h"
class AuditoriumMode : public SimpleChannelModeHandler
{
public:
AuditoriumMode(Module* Creator) : SimpleChannelModeHandler(Creator, "auditorium", 'u')
{
- levelrequired = OP_VALUE;
+ ranktoset = ranktounset = OP_VALUE;
}
};
class ModuleAuditorium : public Module
{
+ CheckExemption::EventProvider exemptionprov;
AuditoriumMode aum;
bool OpsVisible;
bool OpsCanSee;
bool OperCanSee;
public:
- ModuleAuditorium() : aum(this)
+ ModuleAuditorium()
+ : exemptionprov(this)
+ , aum(this)
{
}
if (!memb->chan->IsModeSet(&aum))
return true;
- ModResult res = ServerInstance->OnCheckExemption(memb->user, memb->chan, "auditorium-vis");
+ ModResult res = CheckExemption::Call(exemptionprov, memb->user, memb->chan, "auditorium-vis");
return res.check(OpsVisible && memb->getRank() >= OP_VALUE);
}
return true;
// Can you see the list by permission?
- ModResult res = ServerInstance->OnCheckExemption(issuer,memb->chan,"auditorium-see");
+ ModResult res = CheckExemption::Call(exemptionprov, issuer, memb->chan, "auditorium-see");
if (res.check(OpsCanSee && memb->chan->GetPrefixValue(issuer) >= OP_VALUE))
return true;