From 53d97e020fcb1698b1c17ca79febd235fa712d31 Mon Sep 17 00:00:00 2001 From: Bram Matthys Date: Sun, 30 Jun 2024 19:26:02 +0200 Subject: [PATCH] Fix for last commit: except ban { } was not checked for ban user { } blocks --- src/modules/tkl.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/modules/tkl.c b/src/modules/tkl.c index 7cd8334aa..4daaa68f3 100644 --- a/src/modules/tkl.c +++ b/src/modules/tkl.c @@ -3413,7 +3413,15 @@ int find_tkline_match_matcher(Client *client, int skip_soft, TKL *tkl) /* For config file ban { } we use security groups instead of simple user/host */ if (tkl->ptr.serverban->match) - return user_allowed_by_security_group(client, tkl->ptr.serverban->match); + { + if (user_allowed_by_security_group(client, tkl->ptr.serverban->match)) + { + if (find_tkl_exception(tkl->type, client)) + return 0; /* exempted */ + return 1; /* banned */ + } + return 0; + } tkl_uhost(tkl, uhost, sizeof(uhost), NO_SOFT_PREFIX);