summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--docs/conf/opers.conf.example5
-rw-r--r--src/modules/m_commonchans.cpp2
2 files changed, 4 insertions, 3 deletions
diff --git a/docs/conf/opers.conf.example b/docs/conf/opers.conf.example
index f9f6a75d4..5e813c4ba 100644
--- a/docs/conf/opers.conf.example
+++ b/docs/conf/opers.conf.example
@@ -23,10 +23,10 @@
# - users/auspex: allows opers with this priv to view more details about users than normal users, e.g. real host and IP.
# - users/channel-spy: allows opers with this priv to view the private/secret channels that a user is on.
# - servers/auspex: allows opers with this priv to see more details about server information than normal users.
- # ACTIONS:
+ # ACTIONS:
# - 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:
+ # 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.
@@ -34,6 +34,7 @@
# - 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-commonchans: allows opers with this priv to send a message to a +c user without sharing common channels.
# - 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.
diff --git a/src/modules/m_commonchans.cpp b/src/modules/m_commonchans.cpp
index 4cef93029..2cb318a68 100644
--- a/src/modules/m_commonchans.cpp
+++ b/src/modules/m_commonchans.cpp
@@ -38,7 +38,7 @@ class ModulePrivacyMode : public Module
if (target.type == MessageTarget::TYPE_USER)
{
User* t = target.Get<User>();
- if (!user->IsOper() && (t->IsModeSet(pm)) && (!user->server->IsULine()) && !user->SharesChannelWith(t))
+ if (!user->HasPrivPermission("users/ignore-commonchans") && (t->IsModeSet(pm)) && (!user->server->IsULine()) && !user->SharesChannelWith(t))
{
user->WriteNumeric(ERR_CANTSENDTOUSER, t->nick, "You are not permitted to send private messages to this user (+c set)");
return MOD_RES_DENY;