mirror of
https://github.com/anope/anope.git
synced 2026-06-28 10:06:37 +02:00
BUILD : 1.7.7 (540) BUGS : 277 NOTES : BotServ Badwords (START) would return a false positivie when BSCaseSensitive is enabled
git-svn-id: svn://svn.anope.org/anope/trunk@540 31f1291d-b8d6-0310-a050-a5561fc1590b git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@393 5417fbe8-f217-4b02-8779-1006273d7864
This commit is contained in:
parent
a3d993d02c
commit
bafd62e477
@@ -1,6 +1,7 @@
|
||||
Anope Version S V N
|
||||
-------------------
|
||||
Provided by Anope Dev. <dev@anope.org> - 2005
|
||||
01/16 F BS Badwords had a false positives if BSCaseSensitive wass enabled [#277]
|
||||
01/15 F Updated typo in example.conf. [#279]
|
||||
|
||||
Anope Version 1.7.7
|
||||
|
||||
+18
-15
@@ -295,7 +295,7 @@ void botchanmsgs(User * u, ChannelInfo * ci, char *buf)
|
||||
} else if (bw->type == BW_SINGLE) {
|
||||
int len = strlen(bw->word);
|
||||
|
||||
if ((BSCaseSensitive && strstr(nbuf, bw->word))
|
||||
if ((BSCaseSensitive && !strcmp(nbuf, bw->word))
|
||||
|| (!BSCaseSensitive
|
||||
&& (!stricmp(nbuf, bw->word)))) {
|
||||
mustkick = 1;
|
||||
@@ -303,12 +303,12 @@ void botchanmsgs(User * u, ChannelInfo * ci, char *buf)
|
||||
} else if ((strchr(nbuf, ' ') == nbuf + len)
|
||||
&&
|
||||
((BSCaseSensitive
|
||||
&& (strstr(nbuf, bw->word) == nbuf))
|
||||
&& !strcmp(nbuf, bw->word))
|
||||
|| (!BSCaseSensitive
|
||||
&& (stristr(nbuf, bw->word) ==
|
||||
nbuf)))) {
|
||||
mustkick = 1;
|
||||
} else
|
||||
} else {
|
||||
if ((strrchr(nbuf, ' ') ==
|
||||
nbuf + strlen(nbuf) - len - 1)
|
||||
&&
|
||||
@@ -318,19 +318,22 @@ void botchanmsgs(User * u, ChannelInfo * ci, char *buf)
|
||||
|| (!BSCaseSensitive
|
||||
&& (stristr(nbuf, bw->word) ==
|
||||
nbuf + strlen(nbuf) - len)))) {
|
||||
mustkick = 1;
|
||||
} else {
|
||||
char *wordbuf = scalloc(len + 3, 1);
|
||||
|
||||
wordbuf[0] = ' ';
|
||||
wordbuf[len + 1] = ' ';
|
||||
wordbuf[len + 2] = '\0';
|
||||
memcpy(wordbuf + 1, bw->word, len);
|
||||
|
||||
if ((BSCaseSensitive && (strstr(nbuf, wordbuf)))
|
||||
|| (!BSCaseSensitive
|
||||
&& (stristr(nbuf, wordbuf))))
|
||||
mustkick = 1;
|
||||
} else {
|
||||
char *wordbuf = scalloc(len + 3, 1);
|
||||
|
||||
wordbuf[0] = ' ';
|
||||
wordbuf[len + 1] = ' ';
|
||||
wordbuf[len + 2] = '\0';
|
||||
memcpy(wordbuf + 1, bw->word, len);
|
||||
|
||||
if ((BSCaseSensitive
|
||||
&& (strstr(nbuf, wordbuf)))
|
||||
|| (!BSCaseSensitive
|
||||
&& (stristr(nbuf, wordbuf)))) {
|
||||
mustkick = 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
} else if (bw->type == BW_START) {
|
||||
int len = strlen(bw->word);
|
||||
|
||||
+5
-1
@@ -8,10 +8,14 @@
|
||||
VERSION_MAJOR="1"
|
||||
VERSION_MINOR="7"
|
||||
VERSION_PATCH="7"
|
||||
VERSION_BUILD="539"
|
||||
VERSION_BUILD="540"
|
||||
|
||||
# $Log$
|
||||
#
|
||||
# BUILD : 1.7.7 (540)
|
||||
# BUGS : 277
|
||||
# NOTES : BotServ Badwords (START) would return a false positivie when BSCaseSensitive is enabled
|
||||
#
|
||||
# BUILD : 1.7.7 (539)
|
||||
# BUGS : 279
|
||||
# NOTES : Fixed typo in example.conf...
|
||||
|
||||
Reference in New Issue
Block a user