Skip to content

Commit

Permalink
Only use lookup_user_record when necessary
Browse files Browse the repository at this point in the history
  • Loading branch information
thommey authored Jun 29, 2024
1 parent ef0663b commit 20bfe5e
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/mod/irc.mod/chan.c
Original file line number Diff line number Diff line change
Expand Up @@ -325,7 +325,11 @@ static int detect_chan_flood(char *floodnick, char *floodhost, char *from,
chan->floodwho[which][0] = 0;
if (which == FLOOD_DEOP)
chan->deopd[0] = 0;
u = lookup_user_record(m, NULL, from);
if (which == FLOOD_JOIN) {
u = lookup_user_record(m, victim_or_account, from);
} else {
u = get_user_from_member(m);
}
if (check_tcl_flud(floodnick, floodhost, u, ftype, chan->dname))
return 0;
switch (which) {
Expand Down

0 comments on commit 20bfe5e

Please sign in to comment.