inspircd

A modular C++ IRC daemon (ircd). https://www.inspircd.org/
Log | Files | Refs | README

commit 5f2ecf00132433c875c78b475ea46c8b73bf5f57
parent d57cad7896a4e9f78565d998e3fbd98b0b32c94e
Author: Matt Schatz <genius3000@g3k.solutions>
Date:   Wed, 13 Mar 2019 03:04:13 -0600

Add oper privs to allow overriding noctcp.

Diffstat:
Mdocs/conf/opers.conf.example | 2++
Msrc/modules/m_noctcp.cpp | 6++++++
2 files changed, 8 insertions(+), 0 deletions(-)

diff --git 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 @@ -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) @@ -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<User>(); if (u->IsModeSet(ncu)) {