#include "inspircd.h"
+#include "modules/exemption.h"
class NoNotice : public SimpleChannelModeHandler
{
class ModuleNoNotice : public Module
{
+ CheckExemption::EventProvider exemptionprov;
NoNotice nt;
public:
ModuleNoNotice()
- : nt(this)
+ : exemptionprov(this)
+ , nt(this)
{
}
Channel* c = (Channel*)dest;
if (!c->GetExtBanStatus(user, 'T').check(!c->IsModeSet(nt)))
{
- res = ServerInstance->OnCheckExemption(user,c,"nonotice");
+ FIRST_MOD_RESULT_CUSTOM(exemptionprov, CheckExemption::EventListener, OnCheckExemption, res, (user, c, "nonotice"));
if (res == MOD_RES_ALLOW)
return MOD_RES_PASSTHRU;
else
{
- user->WriteNumeric(ERR_CANNOTSENDTOCHAN, "%s :Can't send NOTICE to channel (+T set)", c->name.c_str());
+ user->WriteNumeric(ERR_CANNOTSENDTOCHAN, c->name, "Can't send NOTICE to channel (+T set)");
return MOD_RES_DENY;
}
}