Test sent_kick instead of kickcount for KICKFLOOD kicking

kickcount is for counting KICKs sent by the user to detect KICK floods.
This commit is contained in:
Kevin Easton
2017-06-11 00:36:53 +10:00
parent 07ab60f3ff
commit 64d524804c

View File

@@ -1735,7 +1735,7 @@ static void p_kick(char *from, char **ArgList)
{ {
if (get_cset_int_var(chan->csets, KICK_ON_KICKFLOOD_CSET) > get_cset_int_var(chan->csets, DEOP_ON_KICKFLOOD_CSET)) if (get_cset_int_var(chan->csets, KICK_ON_KICKFLOOD_CSET) > get_cset_int_var(chan->csets, DEOP_ON_KICKFLOOD_CSET))
send_to_server("MODE %s -o %s", chan->channel, from); send_to_server("MODE %s -o %s", chan->channel, from);
else if (!f_nick->kickcount++) else if (!from_nick->sent_kick++)
send_to_server("KICK %s %s :\002Mass kick detected - (%d kicks in %dsec%s)\002", chan->channel, from, get_cset_int_var(chan->csets, KICK_ON_KICKFLOOD_CSET), t, plural(t)); send_to_server("KICK %s %s :\002Mass kick detected - (%d kicks in %dsec%s)\002", chan->channel, from, get_cset_int_var(chan->csets, KICK_ON_KICKFLOOD_CSET), t, plural(t));
} }
#ifdef WANT_USERLIST #ifdef WANT_USERLIST