Register for your free account! | Forgot your password?

Go Back   elitepvpers > MMORPGs > Conquer Online 2 > CO2 Private Server > CO2 PServer Guides & Releases
You last visited: Today at 21:42

  • Please register to post and access all features, it's quick, easy and FREE!

Advertisement



[REL] 241 bad words included in .txt and .sql

Discussion on [REL] 241 bad words included in .txt and .sql within the CO2 PServer Guides & Releases forum part of the CO2 Private Server category.

Reply
 
Old   #1
 
ImmuneOne's Avatar
 
elite*gold: 0
Join Date: Nov 2009
Posts: 754
Received Thanks: 544
[REL] 241 bad words included in .txt and .sql and Serverside filter for CoEmu + 5156

Hey,

I've been creating a server-side filter in order to keep my server clean, and to not disappoint players who care.

I'm not giving the actual code but atleast gonna give the 241 words.
I have nothing else to say, seeya.

**Server-Side filter
Attached Files
File Type: txt badwords.sql.txt (12.4 KB, 47 views)
File Type: txt filter.txt (3.3 KB, 44 views)
ImmuneOne is offline  
Thanks
1 User
Old 12/13/2009, 00:47   #2
 
nTL3fTy's Avatar
 
elite*gold: 0
Join Date: Jun 2005
Posts: 692
Received Thanks: 353
***** is a medical term. Same goes for ******. Same goes for various others. But if you feel the need ...
nTL3fTy is offline  
Thanks
1 User
Old 12/13/2009, 00:54   #3
 
ImmuneOne's Avatar
 
elite*gold: 0
Join Date: Nov 2009
Posts: 754
Received Thanks: 544
Quote:
Originally Posted by nTL3fTy View Post
***** is a medical term. Same goes for ******. Same goes for various others. But if you feel the need ...
There certainly is, medical terms shouldn't belong in a gamechat anyway.
ImmuneOne is offline  
Old 12/13/2009, 00:55   #4
 
elite*gold: 0
Join Date: Aug 2008
Posts: 889
Received Thanks: 199
Quote:
Originally Posted by ImmuneOne View Post
There certainly is, medical terms shouldn't belong in a gamechat anyway.
You're right .
zbest is offline  
Old 12/13/2009, 01:18   #5
 
ImmuneOne's Avatar
 
elite*gold: 0
Join Date: Nov 2009
Posts: 754
Received Thanks: 544
Recent changes:
- Server-side filter added (Compatibility with CoEmu and NewestCOServer v5156)
- filter.txt has been changed in order to let it work with the server-side filter.
- Thread title has been changed.
ImmuneOne is offline  
Old 12/13/2009, 13:48   #6
 
_Emme_'s Avatar
 
elite*gold: 1142
Join Date: Aug 2006
Posts: 2,464
Received Thanks: 1,162
An tip:

You done it like:

Quote:
****
*****
slutty
slutz
Instead, you can do it like:

Quote:
****
Store all the bad words in the source, and then check if the message contains any of the bad word, and just replace the bad word with ****. Therefore, if they type 'slutty', it would come out as 'ty'.
_Emme_ is offline  
Old 12/13/2009, 14:15   #7
 
ImmuneOne's Avatar
 
elite*gold: 0
Join Date: Nov 2009
Posts: 754
Received Thanks: 544
Quote:
Originally Posted by EmmeTheCoder View Post
An tip:

You done it like:



Instead, you can do it like:



Store all the bad words in the source, and then check if the message contains any of the bad word, and just replace the bad word with ****. Therefore, if they type 'slutty', it would come out as 'ty'.
Quote:
Message = Message.Replace("Word", "****");
Inserting every word, into the source like that is too much work.
And the concept of this idea that the receiving target doesn't know what he swears with. I could pretty easy figure out what he said if i saw ****ty or ****er
ImmuneOne is offline  
Old 12/16/2009, 01:41   #8
 
elite*gold: 0
Join Date: Aug 2009
Posts: 930
Received Thanks: 448
idk if it's possible, but why not just (close to what emme said) if the word includes forsay: "****", then * the entire word, whether they put "slutTYAGHAGAYAHNHAGAty" or just "slutTY". or disable the chat if that word is in the dialog. ex: Jimmy is speaking to Bob.

Bob: "Dude your mom is so hott"
Jimmy: ""
Bob: "What did you say?"
Jimmy: ""


seeing simply that, it is like an anti-profanity chat system, if the dialog contains a blocked word, then disable the chat that is sent.
.Guru is offline  
Old 12/16/2009, 01:54   #9
 
elite*gold: 0
Join Date: Jan 2009
Posts: 1,922
Received Thanks: 491
As emme and others said...

search all the words in the message if any contain the word **** then block it out with **** or like some games just clear the message and make it say like " I Love bunnies "
PeTe Ninja is offline  
Old 12/16/2009, 02:34   #10
 
elite*gold: 0
Join Date: Nov 2009
Posts: 129
Received Thanks: 45
Your code could be optimized by a considerable amount.

Your cycling through a text document every single time the chat packet is received.
The better option would be to load the "bad" words at initialization and store them to a collection, saving execution time when chatting.

The coding of the loop isn't great either.

I would do something like this.

Code:
//Declaration of Collection
public static Dictionary<string,string> Filter = new Dictionary<string,string>();

//The filter.txt should always be in the correct directory.
//Use Original word as the key, and the value as the one to replace
//Do this at startup
foreach(string Line in File.ReadAllLines(Directory + @"\Filter.txt"))
{
string[] lSplitter = Line.Split('#');
Filter.Add(lSplitter[0],lSplitter[1]);
}
//Then in your chat.cs
foreach (KeyValuePair<string,string> kvp in Filter)
{
if (message.Contains(kvp.Key))
message = message.Replace(kvp.Key, kvp.Value);
}
Of course, that can still probably be improved, but imo it's superior to your method.
~Falcon is offline  
Old 12/16/2009, 04:09   #11
 
elite*gold: 0
Join Date: Jan 2009
Posts: 1,922
Received Thanks: 491
falcon just owned you ahahhaha
PeTe Ninja is offline  
Old 12/16/2009, 09:01   #12
 
ImmuneOne's Avatar
 
elite*gold: 0
Join Date: Nov 2009
Posts: 754
Received Thanks: 544
Quote:
Originally Posted by PeTe Ninja View Post
falcon just owned you ahahhaha
Excuse me,
I was never about to give the real function now do i? The fun part of it all is that i don't even use coemu.

Oh and falcon, thanks for trying to help out but i did exact the same and none of the ways (yours and mine) did work at my computer, while they did at my laptop. So thats kinda what's been bugging me and made me do that.
ImmuneOne is offline  
Reply


Similar Threads Similar Threads
3 - Words Story
07/17/2010 - Off Topic - 5 Replies
Hallo ersmal :D ich bin mir nich sicher ob so ein Thema nicht vielleicht doch verboten ist wegen der meiner meinung nach großen "spamm gefahr" egal ... hoffe der thread bleibt eine weile offen Hello epvpers :D I'm not sure if this Topic is not allowed, because auf the danger of becoming a spamm thread. but I hope this Thread will stay open for a while Nun zum Thema: Now the Topic:
[JUST 4 FUN] A 3 WORDS STORY
03/01/2010 - Soldier Front Philippines - 19 Replies
NOTE: STORY ABOUT THE GAME ONLY.... Umpisahan ko na.... Sumali ako sa.....
[How to]Own a Gm with Words
12/14/2009 - Metin2 Guides & Templates - 32 Replies
Also ich sage euch heute wie ihr einen Gm mit puren Worten ownen könnt und dafür kriegt ihr kein Ban. Macht euch mehrere Chars und tut eine z.B Al bennenen und den andere och stellt die nebeneinander. So könnt ihr z.B Sätze bilde wie Du Ar sch loch G. M oder so irgendwas lasst eurer Fantasie freien lauf. :D Vill mache ich noch ein Vid rein :D. HéHé euer Stupido Mizu
Any one know how to delete... words...
08/31/2009 - 12Sky2 - 6 Replies
hey how to delete blocking words like fuck, sex, etc ?



All times are GMT +2. The time now is 21:42.


Powered by vBulletin®
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
SEO by vBSEO ©2011, Crawlability, Inc.
This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

Support | Contact Us | FAQ | Advertising | Privacy Policy | Terms of Service | Abuse
Copyright ©2025 elitepvpers All Rights Reserved.