]> jfr.im git - irc/atheme/atheme.git/commitdiff
user_is_channel_banned(): check for voice/op/etc.
authorJanik Kleinhoff <redacted>
Thu, 8 Jan 2015 20:42:45 +0000 (20:42 +0000)
committerWilliam Pitcock <redacted>
Mon, 9 Feb 2015 15:59:19 +0000 (09:59 -0600)
ircds typically allow ignoring bans/quiets for voiced users and above,
so we shouldn't consider them in this case either.

libathemecore/users.c

index f643bb81ebe2686df8f3d330b9ac8d116fbdcc63..21f0febdff03b304961947532c9825e14a7fe1e4 100644 (file)
@@ -649,6 +649,10 @@ bool user_is_channel_banned(user_t *u, char ban_type)
        {
                chanuser_t *cu = n->data;
 
+               /* Assume that any prefix modes allow changing nicks even while banned */
+               if (cu->modes != 0)
+                       continue;
+
                if (next_matching_ban(cu->chan, u, ban_type, cu->chan->bans.head) != NULL)
                {
                        if (ircd->except_mchar == '\0' || next_matching_ban(cu->chan, u, ircd->except_mchar, cu->chan->bans.head) == NULL)