X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;f=src%2Fmodules%2Fm_noctcp.cpp;h=c73f8308e08005e1fbb25010d065f942a4263ae7;hb=08d2ff86b0c7ed91549d832cf3e572c8623dc8e8;hp=af14c73ec14fa8e4ebc623f27b7339822f29b2df;hpb=c6e40d36b42a7ebf832c3a57d2816a47ee9c9a76;p=user%2Fhenk%2Fcode%2Finspircd.git diff --git a/src/modules/m_noctcp.cpp b/src/modules/m_noctcp.cpp index af14c73ec..c73f8308e 100644 --- a/src/modules/m_noctcp.cpp +++ b/src/modules/m_noctcp.cpp @@ -63,6 +63,9 @@ class ModuleNoCTCP : public Module if (target.type == MessageTarget::TYPE_CHANNEL) { + if (user->HasPrivPermission("channels/ignore-noctcp")) + return MOD_RES_PASSTHRU; + Channel* c = target.Get(); ModResult res = CheckExemption::Call(exemptionprov, user, c, "noctcp"); if (res == MOD_RES_ALLOW) @@ -70,17 +73,20 @@ class ModuleNoCTCP : public Module 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(); 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;