From 68ff62f6e3dbb092c9a4341f83e08ee451ef0714 Mon Sep 17 00:00:00 2001 From: cyberbotx Date: Sat, 14 Mar 2009 23:23:52 +0000 Subject: [PATCH] Fix bug #1056, patch from Adam, BotServ kickers should now ban for like it should. git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2163 5417fbe8-f217-4b02-8779-1006273d7864 --- src/botserv.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/botserv.c b/src/botserv.c index 1f0a13421..6cbdb4302 100644 --- a/src/botserv.c +++ b/src/botserv.c @@ -421,7 +421,7 @@ void botchanmsgs(User * u, ChannelInfo * ci, char *buf) /* Strip off the fantasy character */ cmd++; - if (check_access(u, ci, CA_FANTASIA)) + if (check_access(u, ci, CA_FANTASIA)) { std::string bbuf = std::string(cmd) + " " + ci->name; if (params) @@ -758,7 +758,11 @@ 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]) + { + /* Should not use == here because bd->ttb[ttbtype] could possibly be > ci->ttb[ttbtype] + * if the TTB was changed after it was not set (0) before and the user had already been + * kicked a few times. Bug #1056 - Adam */ const char *av[4]; int ac; char mask[BUFSIZE];