From 9f58e97d5d50cccbfc367bdd83c4646ae0e96a90 Mon Sep 17 00:00:00 2001 From: Ed Kellett Date: Thu, 29 Oct 2020 23:56:51 +0000 Subject: [PATCH] searchkline: match dlines iff the user mask is * --- modules/m_searchkline.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/modules/m_searchkline.c b/modules/m_searchkline.c index 32274c724..17d23a41a 100644 --- a/modules/m_searchkline.c +++ b/modules/m_searchkline.c @@ -92,6 +92,7 @@ search_ip_kdlines(struct Client *client, const char *username, struct sockaddr * bool found = false; struct AddressRec *arec; int masktype = fam == AF_INET ? HM_IPV4 : HM_IPV6; + bool match_dlines = mask_match(username, "*"); size_t i; size_t min = 0; @@ -118,6 +119,8 @@ search_ip_kdlines(struct Client *client, const char *username, struct sockaddr * if (arec->type == CONF_KILL && !mask_match(username, arec->username)) continue; + if (arec->type == CONF_DLINE && !match_dlines) + continue; report_kdline(client, arec->type, arec->aconf); found = true;