aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Ed Kellett2020-10-29 23:56:51 +0000
committerGravatar Ed Kellett2021-01-26 12:03:13 +0000
commit9f58e97d5d50cccbfc367bdd83c4646ae0e96a90 (patch)
treeb64a53c5263a061122b29b32ad7789b34fc9ec36
parentAdd help for searchkline (diff)
downloadsolanum-edk/searchkline.tar.gz
solanum-edk/searchkline.tar.bz2
solanum-edk/searchkline.zip
searchkline: match dlines iff the user mask is * edk/searchkline
-rw-r--r--modules/m_searchkline.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/modules/m_searchkline.c b/modules/m_searchkline.c
index 32274c72..17d23a41 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;