#include "inspircd.h"
#include "modules/exemption.h"
-/** Handles the +c channel mode
- */
-class BlockColor : public SimpleChannelModeHandler
-{
- public:
- BlockColor(Module* Creator) : SimpleChannelModeHandler(Creator, "blockcolor", 'c') { }
-};
-
class ModuleBlockColor : public Module
{
CheckExemption::EventProvider exemptionprov;
- BlockColor bc;
+ SimpleChannelModeHandler bc;
public:
ModuleBlockColor()
: exemptionprov(this)
- , bc(this)
+ , bc(this, "blockcolor", 'c')
{
}
if ((target_type == TYPE_CHANNEL) && (IS_LOCAL(user)))
{
Channel* c = (Channel*)dest;
- ModResult res;
- FIRST_MOD_RESULT_CUSTOM(exemptionprov, CheckExemption::EventListener, OnCheckExemption, res, (user, c, "blockcolor"));
+ ModResult res = CheckExemption::Call(exemptionprov, user, c, "blockcolor");
if (res == MOD_RES_ALLOW)
return MOD_RES_PASSTHRU;