diff options
| author | rburchell <rburchell@5417fbe8-f217-4b02-8779-1006273d7864> | 2009-02-07 22:39:10 +0000 |
|---|---|---|
| committer | rburchell <rburchell@5417fbe8-f217-4b02-8779-1006273d7864> | 2009-02-07 22:39:10 +0000 |
| commit | 932391f34e7e3bc9967582c61d0bf98f9c599625 (patch) | |
| tree | a94e34e38b35f552b8f3699aa747b2d3798c0b79 /src/channels.c | |
| parent | 226710743e071cb57cb29a50bc1134030c0a5e55 (diff) | |
Forward-port r1946: Patch by Adam fixing #1006 (originally caused by #922): modes set by ChanServ are reversed. Thanks!
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@1947 5417fbe8-f217-4b02-8779-1006273d7864
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++; } } |
