diff options
author | cyberbotx <cyberbotx@5417fbe8-f217-4b02-8779-1006273d7864> | 2010-05-21 22:36:06 +0000 |
---|---|---|
committer | cyberbotx <cyberbotx@5417fbe8-f217-4b02-8779-1006273d7864> | 2010-05-21 22:36:06 +0000 |
commit | 8e39d5f21928b29074da7e494f79d2f76119ffc6 (patch) | |
tree | 7d3446dda11142245ef737748c243a6e04cd8973 | |
parent | 0a91d582c9a070acd99977996da841134b2085ad (diff) |
Fix crash bug when there is a caps kicker in a channel but no alphabetic characters on a line.
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2973 5417fbe8-f217-4b02-8779-1006273d7864
-rw-r--r-- | src/botserv.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/botserv.c b/src/botserv.c index 3f535783a..893d3af3b 100644 --- a/src/botserv.c +++ b/src/botserv.c @@ -172,7 +172,7 @@ void botchanmsgs(User * u, ChannelInfo * ci, char *buf) Allow = true; else if (ci->botflags.HasFlag(BS_DONTKICKVOICES) && ci->c->HasUserStatus(u, CMODE_VOICE)) Allow = true; - + if (buf && !check_access(u, ci, CA_NOKICK) && Allow) { /* Bolds kicker */ @@ -222,7 +222,7 @@ void botchanmsgs(User * u, ChannelInfo * ci, char *buf) * percentage of caps to kick for; the rest is ignored. -GD */ - if (i >= ci->capsmin && i * 100 / (i + l) >= ci->capspercent) { + if (i && l && i >= ci->capsmin && i * 100 / (i + l) >= ci->capspercent) { check_ban(ci, u, TTB_CAPS); bot_kick(ci, u, BOT_REASON_CAPS); return; @@ -664,7 +664,7 @@ static void check_ban(ChannelInfo *ci, User *u, int ttbtype) if (!bd) return; - + /* Don't ban ulines */ if (is_ulined(u->server->name)) return; |