summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorcyberbotx <cyberbotx@5417fbe8-f217-4b02-8779-1006273d7864>2009-03-14 23:23:52 +0000
committercyberbotx <cyberbotx@5417fbe8-f217-4b02-8779-1006273d7864>2009-03-14 23:23:52 +0000
commit68ff62f6e3dbb092c9a4341f83e08ee451ef0714 (patch)
tree0b96b01852c04e625c08e7bdf3408ed36e744669 /src
parent4f4b42562a5230bc76379d8c505c43d2ebadeb9f (diff)
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
Diffstat (limited to 'src')
-rw-r--r--src/botserv.c8
1 files 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];