diff options
| author | geniusdex geniusdex@31f1291d-b8d6-0310-a050-a5561fc1590b <geniusdex geniusdex@31f1291d-b8d6-0310-a050-a5561fc1590b@5417fbe8-f217-4b02-8779-1006273d7864> | 2006-10-07 15:11:22 +0000 |
|---|---|---|
| committer | geniusdex geniusdex@31f1291d-b8d6-0310-a050-a5561fc1590b <geniusdex geniusdex@31f1291d-b8d6-0310-a050-a5561fc1590b@5417fbe8-f217-4b02-8779-1006273d7864> | 2006-10-07 15:11:22 +0000 |
| commit | 86f5463a30b1ec7bec886996e733e2b7acfe5a6b (patch) | |
| tree | 6144e491cbb8e35cd4cc3483227e9481fa419a9c /src/botserv.c | |
| parent | 3c17a07b8e22f32d66de64a92478496ed764dcc2 (diff) | |
BUILD : 1.7.15 (1165) BUGS : 603 NOTES : Added support for SVSMODE by parsing it as a MODE on supported IRCDs
git-svn-id: svn://svn.anope.org/anope/trunk@1165 31f1291d-b8d6-0310-a050-a5561fc1590b
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@887 5417fbe8-f217-4b02-8779-1006273d7864
Diffstat (limited to 'src/botserv.c')
| -rw-r--r-- | src/botserv.c | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/src/botserv.c b/src/botserv.c index dd606952e..c73b6c7f9 100644 --- a/src/botserv.c +++ b/src/botserv.c @@ -205,21 +205,21 @@ void botchanmsgs(User * u, ChannelInfo * ci, char *buf) if ((ci->botflags & BS_KICK_CAPS) && ((c = strlen(buf)) >= ci->capsmin)) { int i = 0; - int l = 0; + int l = 0; char *s = buf; do { if (isupper(*s)) i++; - else if (islower(*s)) - l++; + else if (islower(*s)) + l++; } while (*s++); - - /* i counts uppercase chars, l counts lowercase chars. Only - * alphabetic chars (so islower || isupper) qualify for the - * percentage of caps to kick for; the rest is ignored. -GD - */ - + + /* i counts uppercase chars, l counts lowercase chars. Only + * alphabetic chars (so islower || isupper) qualify for the + * percentage of caps to kick for; the rest is ignored. -GD + */ + if (i >= ci->capsmin && i * 100 / (i + l) >= ci->capspercent) { check_ban(ci, u, TTB_CAPS); bot_kick(ci, u, BOT_REASON_CAPS); |
