]> git.netwichtig.de Git - user/henk/code/inspircd.git/commitdiff
m_commonchans: Replace IsOper() with HasPrivPermission() instead.
authorRobby <robby@chatbelgie.be>
Tue, 2 Apr 2019 03:11:26 +0000 (05:11 +0200)
committerPeter Powell <petpow@saberuk.com>
Tue, 2 Apr 2019 09:39:18 +0000 (10:39 +0100)
docs/conf/opers.conf.example
src/modules/m_commonchans.cpp

index f9f6a75d47e48b9313c2ad60800623e278006e76..5e813c4ba846615b1273a6631e62bae19b16ebe0 100644 (file)
      #   - 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.
      #   - 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.
      #   - 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.
      #   - 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/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.
      #   - 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.
index 4cef930293f8cd29c21132ae9b99020b562bdba9..2cb318a68bc374c6315f92edf88b889266c30726 100644 (file)
@@ -38,7 +38,7 @@ class ModulePrivacyMode : public Module
                if (target.type == MessageTarget::TYPE_USER)
                {
                        User* t = target.Get<User>();
                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;
                        {
                                user->WriteNumeric(ERR_CANTSENDTOUSER, t->nick, "You are not permitted to send private messages to this user (+c set)");
                                return MOD_RES_DENY;