/* $ModDesc: Provides support to block all-CAPS channel messages and notices */
-/** Handles the +P channel mode
+/** Handles the +B channel mode
*/
class BlockCaps : public SimpleChannelModeHandler
{
public:
- BlockCaps(Module* Creator) : SimpleChannelModeHandler(Creator, 'B') { }
+ BlockCaps(Module* Creator) : SimpleChannelModeHandler(Creator, "blockcaps", 'B') { }
};
class ModuleBlockCAPS : public Module
return MOD_RES_PASSTHRU;
Channel* c = (Channel*)dest;
+ ModResult res;
+ FIRST_MOD_RESULT(OnChannelRestrictionApply, res, (user,c,"blockcaps"));
- if (CHANOPS_EXEMPT('B') && c->GetPrefixValue(user) == OP_VALUE)
- {
+ if (res == MOD_RES_ALLOW)
return MOD_RES_PASSTHRU;
- }
if (!c->GetExtBanStatus(user, 'B').check(!c->IsModeSet('B')))
{
virtual Version GetVersion()
{
- return Version("Provides support to block all-CAPS channel messages and notices", VF_COMMON|VF_VENDOR,API_VERSION);
+ return Version("Provides support to block all-CAPS channel messages and notices", VF_COMMON|VF_VENDOR);
}
};