Description
Whenever a player says a badword (one of the ones listed in BadWordsList.txt) they are optionally kicked, and their number of used warnings is increased. Once they use up all of their warnings, they are either kicked or banned.
Download
- badwordfilter.zip (316)
Source Code
//config //number of times a player can curse before getting kicked or banned 'BadWordsList.txt'; //file which holds the badwords, each seperated with a space //When a player reaches the curse limit, ban the player? (true or false) //With each offense, kill the player? (true or false) //color of messages told to player BanLength = 15; //minutes a player will be banned for, if the Ban = true; //holders of information //holds the number of warnings for each player //contents of badwords file //credits to DorkeyDear - http://www.soldatforums.com/index.php?topic=27844.0 //load badwords list 'Cannot find badwords file'//we're making the list of badword's case uppercase so they are case insensitive ' '//whenever someone says something, check it. //do we any badwords to check? //for now, make it false //check it! //if it is a bad word, make it known that we cursed //we're making what they said upercase so the badwords are case insensitive //saying something naughty? //increase number of warnings used //reached limit //reset limit for this id //Ban or kick? //under limit.. //should we kill him / her? //notify player of this 'You have been warned for offensive language.''If you curse '' more time(s), you will be ''banned','kicked')+'.'