From 07c41b2b9971b0c91d1f2d05af1e874cda476229 Mon Sep 17 00:00:00 2001 From: Rafael Barreto Date: Fri, 4 Jun 2010 20:49:20 +0000 Subject: [PATCH] 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 --- config/forbidden.cfg | 29 +++++++++++++++++++++++++++++ source/src/tools.h | 4 ++-- 2 files changed, 31 insertions(+), 2 deletions(-) create mode 100644 config/forbidden.cfg diff --git a/config/forbidden.cfg b/config/forbidden.cfg new file mode 100644 index 00000000..e23c0099 --- /dev/null +++ b/config/forbidden.cfg @@ -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 + + diff --git a/source/src/tools.h b/source/src/tools.h index 53374e2f..dda1ac81 100644 --- a/source/src/tools.h +++ b/source/src/tools.h @@ -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