n o w i t w i l l b e d e t e c t e d :P

git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@5143 e016b1c5-ed68-44aa-a2f7-31cac88cffde
This commit is contained in:
Rafael Barreto
2010-06-04 20:49:20 +00:00
parent 2a13607e1e
commit 07c41b2b99
2 changed files with 31 additions and 2 deletions
+29
View File
@@ -0,0 +1,29 @@
// Put in this file the words you consider to be inappropriate in your server
// The system automatically pass all uppercase letters to lowercase
// You can put pairs of words which should not come together in the same phrase
// so "banana caramelada" will block "eu tenho uma banana, que eh muito caramelada"
// but will not block "minha banana eh grande"
// Below it is presented some default examples
fuck
bitch
8==
==8
your mother
suck dick
big cock
// from TyD nickblacklist
asshole // "ass" is not blacklisted
horny
hurensohn // "Son of a bitch" in german.
masturb // See "wank".
necrop // Ban names that mention some form of necrophilia.
pedop
penis
pussy
filho puta // "whore" or "slut" in portugese.
redtube
porntube
youporn
+2 -2
View File
@@ -168,8 +168,8 @@ inline bool findpattern (char *s, char *d) // returns true if there is more than
if (!d || (len = strlen(d)) < 1) return false;
char *dp = d, *s_end = s + strlen(s);
while (s != s_end) {
if ( *s == ' ' ) {
dp = d; hit = 0; // spaces separate words
if ( *s == ' ' ) { // spaces separate words
if ( !issimilar(*(s+1),*dp) ) { dp = d; hit = 0; } // d e t e c t i t
}
else if ( issimilar(*s,*dp) ) { dp++; hit++; } // hit!
else if ( hit > 0 ) { // this is not a pair, but there is a previous pattern