Skip to content

Commit

Permalink
searchkline: match dlines iff the user mask is *
Browse files Browse the repository at this point in the history
  • Loading branch information
edk0 committed Jan 26, 2021
1 parent d3e228c commit 9f58e97
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions modules/m_searchkline.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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;
Expand Down

0 comments on commit 9f58e97

Please sign in to comment.