#include "inspircd.h"
+#include "modules/exemption.h"
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)
{
}
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);
}
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;
}
}
- void OnSendWhoLine(User* source, const std::vector<std::string>& params, User* user, Membership* memb, std::string& line) CXX11_OVERRIDE
+ ModResult OnSendWhoLine(User* source, const std::vector<std::string>& params, User* user, Membership* memb, Numeric::Numeric& numeric) CXX11_OVERRIDE
{
if (!memb)
- return;
+ return MOD_RES_PASSTHRU;
if (IsVisible(memb))
- return;
+ return MOD_RES_PASSTHRU;
if (CanSee(source, memb))
- return;
- line.clear();
+ return MOD_RES_PASSTHRU;
+ return MOD_RES_DENY;
}
};