From: pk910 Date: Thu, 28 Jun 2012 06:48:26 +0000 (+0200) Subject: keep in sync with OGN upstream (SVN-325) X-Git-Url: http://git.pk910.de/?p=ircu2.10.12-pk.git;a=commitdiff_plain;h=e8e26a454a724eea9344e72f71f57b02758ce473 keep in sync with OGN upstream (SVN-325) --- diff --git a/ircd/s_user.c b/ircd/s_user.c index 53cebf2..9f45018 100644 --- a/ircd/s_user.c +++ b/ircd/s_user.c @@ -1069,6 +1069,25 @@ hide_hostmask(struct Client *cptr, unsigned int flag) else { SetDelayedJoin(chan); } + + /* + * Check if the client is actually overriding a ban with the + * mask change, if so, kick him out of the channel. + * We have to proceed that way to ensure data consistency (join + kick) + */ + if (find_ban(cptr, chan->channel->banlist)) { + /* Silentely kick in case of delayed join */ + if (chan->channel->mode.mode & MODE_DELJOINS) { + sendcmdto_one(&his, CMD_KICK, cptr, "%H %C :Ban override", chan->channel, cptr); + CheckDelayedJoins(chan->channel); + + } else { + /* Otherwise publicly kick */ + sendcmdto_serv_butone(&me, CMD_KICK, NULL, "%H %C :Ban override", chan->channel, cptr); + sendcmdto_channel_butserv_butone(&his, CMD_KICK, chan->channel, NULL, 0, "%H %C :Ban override", chan->channel, cptr); + make_zombie(chan, cptr, &me, &me, chan->channel); + } + } } return 0; }