- user->WriteNumeric(ERR_NOCTCPALLOWED, "%s :Can't send CTCP to channel (+C set)", c->name.c_str());
+ 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 is set)");