X-Git-Url: http://git.pk910.de/?p=ircu2.10.12-pk.git;a=blobdiff_plain;f=ircd%2Fs_user.c;h=fc502ae568d77cc656ffc547d8f8a65116c8397a;hp=53cebf2602df7e646dd136b4238b39635972a014;hb=49a3e403162637057a03fd2e27232530b6c635e3;hpb=21592a40b5608357580412667ce0c31b8a1ebc5f diff --git a/ircd/s_user.c b/ircd/s_user.c index 53cebf2..fc502ae 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; } @@ -1402,7 +1421,7 @@ int set_user_mode(struct Client *cptr, struct Client *sptr, int parc, if (IsRegistered(sptr)) { if(do_host_hiding) - hide_hostmask(sptr, 0); + hide_hostmask(sptr, HIDE_HOSTMASK_FLAG_HIDDENHOST); if (!FlagHas(&setflags, FLAG_OPER) && IsOper(sptr)) { /* user now oper */