From c4247b71b2b5ce70216dad49a5fa1ae689de5a63 Mon Sep 17 00:00:00 2001 From: Adam- Date: Sat, 13 Mar 2010 20:46:16 +0000 Subject: Fixed check_ban to apply bans even if TTB was changed after the user has been kicked git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/stable@2808 5417fbe8-f217-4b02-8779-1006273d7864 --- src/botserv.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/botserv.c b/src/botserv.c index 33a5888a5..c8bb069b0 100644 --- a/src/botserv.c +++ b/src/botserv.c @@ -850,7 +850,10 @@ static void check_ban(ChannelInfo * ci, User * u, int ttbtype) return; bd->ttb[ttbtype]++; - if (bd->ttb[ttbtype] == ci->ttb[ttbtype]) { + if (ci->ttb[ttbtype] && bd->ttb[ttbtype] >= ci->ttb[ttbtype]) { + /* bd->ttb[ttbtype] can possibly be > ci->ttb[ttbtype] if ci->ttb[ttbtype] was changed after + * the user has been kicked - Adam + */ char *av[4]; int ac; char mask[BUFSIZE]; -- cgit