From d57cad7896a4e9f78565d998e3fbd98b0b32c94e Mon Sep 17 00:00:00 2001 From: Matt Schatz Date: Wed, 13 Mar 2019 18:33:23 -0600 Subject: Fix incorrect ModResult for noctcp user target. --- src/modules/m_noctcp.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/modules/m_noctcp.cpp') diff --git a/src/modules/m_noctcp.cpp b/src/modules/m_noctcp.cpp index af14c73ec..3a57dc184 100644 --- a/src/modules/m_noctcp.cpp +++ b/src/modules/m_noctcp.cpp @@ -80,7 +80,7 @@ class ModuleNoCTCP : public Module if (u->IsModeSet(ncu)) { user->WriteNumeric(ERR_CANTSENDTOUSER, u->nick, "Can't send CTCP to user (+T set)"); - return MOD_RES_PASSTHRU; + return MOD_RES_DENY; } } return MOD_RES_PASSTHRU; -- cgit v1.3.1-10-gc9f91 From 5f2ecf00132433c875c78b475ea46c8b73bf5f57 Mon Sep 17 00:00:00 2001 From: Matt Schatz Date: Wed, 13 Mar 2019 03:04:13 -0600 Subject: Add oper privs to allow overriding noctcp. --- docs/conf/opers.conf.example | 2 ++ src/modules/m_noctcp.cpp | 6 ++++++ 2 files changed, 8 insertions(+) (limited to 'src/modules/m_noctcp.cpp') diff --git a/docs/conf/opers.conf.example b/docs/conf/opers.conf.example index c5edb9cb2..f9f6a75d4 100644 --- a/docs/conf/opers.conf.example +++ b/docs/conf/opers.conf.example @@ -27,12 +27,14 @@ # - users/mass-message: allows opers with this priv to PRIVMSG and NOTICE to a server mask (e.g. NOTICE $*). # - users/samode-usermodes: allows opers with this priv to change the user modes of any other user using /SAMODE. # PERMISSIONS: + # - channels/ignore-noctcp: allows opers with this priv to send a CTCP to a +C channel. # - channels/ignore-nonicks: allows opers with this priv to change their nick when on a +N channel. # - channels/restricted-create: allows opers with this priv to create channels if the restrictchans module is loaded. # - users/flood/no-fakelag: prevents opers from being penalized with fake lag for flooding (*NOTE). # - users/flood/no-throttle: allows opers with this priv to send commands without being throttled (*NOTE). # - users/flood/increased-buffers: allows opers with this priv to send and receive data without worrying about being disconnected for exceeding limits (*NOTE). # - users/callerid-override: allows opers with this priv to message people using callerid without being on their callerid list. + # - users/ignore-noctcp: allows opers with this priv to send a CTCP to a +T user. # - users/sajoin-others: allows opers with this priv to /SAJOIN users other than themselves. # - servers/use-disabled-commands: allows opers with this priv to use disabled commands. # - servers/use-disabled-modes: allows opers with this priv to use disabled modes. diff --git a/src/modules/m_noctcp.cpp b/src/modules/m_noctcp.cpp index 3a57dc184..13b132eb3 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) @@ -76,6 +79,9 @@ class ModuleNoCTCP : public Module } 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)) { -- cgit v1.3.1-10-gc9f91