Skip to content
This repository was archived by the owner on Jun 6, 2021. It is now read-only.

Commit 0846976

Browse files
committed
masks.c: actually set last_matched on the proper mask(s)
Fixes only the last mask processed being updated (whether or not it actually matched), instead updating all masks that do match (reported or not). We also no longer stop processing when handling an exempt mask since otherwise we'd update last_matched for all *previous* matching masks, which would be quite counterintuitive.
1 parent 5c55fa3 commit 0846976

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

masks.c

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -221,6 +221,8 @@ void masks_newuser(hook_user_nick_t *data)
221221
if (! regex_match(m->re, nuh))
222222
continue;
223223

224+
m->last_match = CURRTIME;
225+
224226
switch (m->type)
225227
{
226228
case mask_exempt:
@@ -236,13 +238,8 @@ void masks_newuser(hook_user_nick_t *data)
236238
case mask_unknown:
237239
break;
238240
}
239-
240-
if (exempt)
241-
break;
242241
}
243242

244-
m->last_match = CURRTIME;
245-
246243
if (exempt == 1)
247244
return;
248245

0 commit comments

Comments
 (0)