]> jfr.im git - irc/rqf/shadowircd.git/commitdiff
Allow +z messages from outside if -n.
authorJilles Tjoelker <redacted>
Sat, 15 Nov 2008 21:56:09 +0000 (22:56 +0100)
committerJilles Tjoelker <redacted>
Sat, 15 Nov 2008 21:56:09 +0000 (22:56 +0100)
This gives a useful meaning to the cmode combo +mz-n:
messages from ops and voices go to all channel members,
messages from anyone else (on or off channel) go to ops.
With +mnz, messages from outside are not allowed at all.

modules/core/m_message.c

index 658a2a309752742fa4655d3f086beb43010bde6b..f22450db4aa733942597dafac9eeac1f2b6de581 100644 (file)
@@ -477,7 +477,8 @@ msg_channel(int p_or_n, const char *command,
        }
        else if(chptr->mode.mode & MODE_OPMODERATE &&
                        chptr->mode.mode & MODE_MODERATED &&
-                       IsMember(source_p, chptr))
+                       (!(chptr->mode.mode & MODE_NOPRIVMSGS) ||
+                        IsMember(source_p, chptr)))
        {
                /* only do +z for +m channels for now, as bans/quiets
                 * aren't tested for remote clients -- jilles */