Skip to content

Commit

Permalink
Apply K-Line exemption to X-Lines too
Browse files Browse the repository at this point in the history
  • Loading branch information
dwfreed committed Sep 8, 2023
1 parent bdacbd4 commit 36f0431
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/client.c
Original file line number Diff line number Diff line change
Expand Up @@ -472,6 +472,14 @@ check_conf_klines(void)
(conf = find_matching_name_conf(RXLINE_TYPE, client_p->info,
NULL, NULL, 0)) != NULL)
{
if (IsExemptKline(client_p))
{
sendto_gnotice_flags(UMODE_ALL, L_ALL, me.name, &me, NULL,
"XLINE over-ruled for %s, client is kline_exempt",
get_client_name(client_p, HIDE_IP));
continue;
}

mconf = &conf->mconf;
sendto_gnotice_flags(UMODE_ALL, L_ALL, me.name, &me, NULL,
"XLINE %s (%s) active for %s", conf->name, mconf->reason,
Expand Down
7 changes: 7 additions & 0 deletions src/s_user.c
Original file line number Diff line number Diff line change
Expand Up @@ -1285,6 +1285,13 @@ check_xline(struct Client *source_p)
(conf = find_matching_name_conf(RXLINE_TYPE, source_p->info, NULL, NULL, 0)))
{
struct MatchItem *reg = &conf->mconf;
if (IsExemptKline(source_p))
{
sendto_gnotice_flags(UMODE_ALL, L_ALL, me.name, &me, NULL,
"XLINE over-ruled for %s, client is kline_exempt",
get_client_name(source_p, HIDE_IP));
return 0;
}

++reg->count;

Expand Down

0 comments on commit 36f0431

Please sign in to comment.