diff options
Diffstat (limited to 'src/channels.c')
-rw-r--r-- | src/channels.c | 17 |
1 files changed, 13 insertions, 4 deletions
diff --git a/src/channels.c b/src/channels.c index 350c60fd3..4d5c08b5a 100644 --- a/src/channels.c +++ b/src/channels.c @@ -303,18 +303,27 @@ void chan_set_modes(const char *source, Channel * chan, int ac, const char **av, } } - if (check > 0) { + if (check > 0) + { check_modes(chan); - if (check < 2) { + if ((check < 2) || (check == 3)) + { /* Walk through all users we've set modes for and see if they are * valid. Invalid modes (like +o with SECUREOPS on) will be removed */ real_ac--; real_av++; - for (i = 0; i < real_ac; i++) { + for (i = 0; i < real_ac; i++) + { if ((user = finduser(*real_av)) && is_on_chan(chan, user)) - chan_set_correct_modes(user, chan, 0); + { + if (check < 2) + chan_set_correct_modes(user, chan, 0); + else if ((chan->ci->flags) && (chan->ci->flags & CI_SECUREOPS)) + chan_set_correct_modes(user, chan, 0); + } + real_av++; } } |