if (target.type == MessageTarget::TYPE_CHANNEL)
{
+ if (user->HasPrivPermission("channels/ignore-noctcp"))
+ return MOD_RES_PASSTHRU;
+
Channel* c = target.Get<Channel>();
ModResult res = CheckExemption::Call(exemptionprov, user, c, "noctcp");
if (res == MOD_RES_ALLOW)
if (!c->GetExtBanStatus(user, 'C').check(!c->IsModeSet(nc)))
{
- user->WriteNumeric(ERR_CANNOTSENDTOCHAN, c->name, "Can't send CTCP to channel (+C set)");
+ user->WriteNumeric(ERR_CANNOTSENDTOCHAN, c->name, "Can't send CTCP to channel (+C is set)");
return MOD_RES_DENY;
}
}
else if (target.type == MessageTarget::TYPE_USER)
{
+ if (user->HasPrivPermission("users/ignore-noctcp"))
+ return MOD_RES_PASSTHRU;
+
User* u = target.Get<User>();
if (u->IsModeSet(ncu))
{
- user->WriteNumeric(ERR_CANTSENDTOUSER, u->nick, "Can't send CTCP to user (+T set)");
- return MOD_RES_PASSTHRU;
+ user->WriteNumeric(ERR_CANTSENDTOUSER, u->nick, "Can't send CTCP to user (+T is set)");
+ return MOD_RES_DENY;
}
}
return MOD_RES_PASSTHRU;