From b6698246baf0c99e176a6fc571c90c1af40416ae Mon Sep 17 00:00:00 2001 From: Jilles Tjoelker Date: Sun, 21 Feb 2010 01:29:41 +0100 Subject: [PATCH] spambot checks: Fix excessive expiry in some cases. --- src/channel.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/channel.c b/src/channel.c index 80bf5c5..c959687 100644 --- a/src/channel.c +++ b/src/channel.c @@ -936,7 +936,9 @@ check_spambot_warning(struct Client *source_p, const char *name) JOIN_LEAVE_COUNT_EXPIRE_TIME) { decrement_count = (t_delta / JOIN_LEAVE_COUNT_EXPIRE_TIME); - if(decrement_count > source_p->localClient->join_leave_count) + if(name != NULL) + ; + else if(decrement_count > source_p->localClient->join_leave_count) source_p->localClient->join_leave_count = 0; else source_p->localClient->join_leave_count -= decrement_count;