]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/modules/m_noctcp.cpp
Some more text fixes and improvements (#1618).
[user/henk/code/inspircd.git] / src / modules / m_noctcp.cpp
index 3a57dc184d46ecd46dbf19c9e67cf169ef6ddb50..c73f8308e08005e1fbb25010d065f942a4263ae7 100644 (file)
@@ -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<Channel>();
                        ModResult res = CheckExemption::Call(exemptionprov, user, c, "noctcp");
                        if (res == MOD_RES_ALLOW)
@@ -70,16 +73,19 @@ 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<User>();
                        if (u->IsModeSet(ncu))
                        {
-                               user->WriteNumeric(ERR_CANTSENDTOUSER, u->nick, "Can't send CTCP to user (+T set)");
+                               user->WriteNumeric(ERR_CANTSENDTOUSER, u->nick, "Can't send CTCP to user (+T is set)");
                                return MOD_RES_DENY;
                        }
                }