diff --git a/doc/RELEASE-NOTES.md b/doc/RELEASE-NOTES.md index 3a1468c9c..2a755a476 100644 --- a/doc/RELEASE-NOTES.md +++ b/doc/RELEASE-NOTES.md @@ -16,8 +16,8 @@ in progress and may not always be a stable version. * The maximum number of ~inherit bans in a channel is limited to only 1 by default, see [set::max-inherit-extended-bans](https://www.unrealircd.org/docs/Set_block#set::max-inherit-extended-bans) - * TODO: This does not work properly yet: This can also be used in `+e` and `+I`, which are counted separately and - have their own limit. + * This can also be used in `+I`, which entries are counted separately and + have their own limit. (TODO: `+e` still needs to be done) ### Changes: * When retrieving cold or hot patches we now do proper GPG/PGP checks. diff --git a/src/channel.c b/src/channel.c index fb75cd6af..16fbeed67 100644 --- a/src/channel.c +++ b/src/channel.c @@ -895,6 +895,7 @@ int find_invex(Channel *channel, Client *client) b->client = client; b->channel = channel; b->ban_check_types = BANCHK_JOIN; + b->ban_type = EXBTYPE_INVEX; for (inv = channel->invexlist; inv; inv = inv->next) { diff --git a/src/modules/extbans/inherit.c b/src/modules/extbans/inherit.c index 174e07814..542db2c39 100644 --- a/src/modules/extbans/inherit.c +++ b/src/modules/extbans/inherit.c @@ -290,9 +290,8 @@ int extban_inherit_is_banned(BanContext *b) { Channel *channel; BanContext *newctx; - Ban *ret; + int ret = 0; const char *errmsg = NULL; - int retval; if (extban_inherit_nested) return 0; @@ -305,8 +304,12 @@ int extban_inherit_is_banned(BanContext *b) return 0; extban_inherit_nested++; - ret = is_banned(b->client, channel, BANCHK_JOIN, NULL, &errmsg); + if (b->ban_type == EXBTYPE_BAN) + ret = is_banned(b->client, channel, BANCHK_JOIN, NULL, &errmsg) ? 1 : 0; + else if (b->ban_type == EXBTYPE_INVEX) + ret = find_invex(channel, b->client); + /* todo: else if (b->ban_type == EXBTYPE_EXCEPT.... */ extban_inherit_nested--; - return ret ? 1 : 0; + return ret; }