-----------------------------------------------------------------------------
                                   ChatFilter
                                  Version 104
                        by Michiel 'El Muerte' Hendriks
                           elmuerte@drunksnipers.com
-----------------------------------------------------------------------------
ChatFilter is a server add-on to clean up the chatting on a server. 
ChatFilter has the power to reduce spamming on a server, it can also filter 
bad words from the line. On bad behavior the player will get a score assigned 
on a defined level actions can taken against the player.

New in version 101:
- added the option to save the chat to a log. for some reason ChatFilter 
  doesn't get the destroyed event so I can't close the log file the normal
  way, because of this you will see a lot "Opening user log" messages in
  the server log file

New in version 102:
- Bad words inside words are now also replaced: shithead -> *****head
- added a new spam protection to allow a maximum number of lines per time
  frame, use fTimeFrame and iMaxPerTimeFrame to control the settings
- The log format was changed a bit, lines are now prefixed with the number
  of seconds since the game was on.

New in version 103:
- Check on BadWords in a players nick name. For this to work you need to add
  ChatFilter to the ServerPackages. If you have ConfigManager loaded it will
  automatically added when this feature is enabled, but it will not be 
  removed when it's disabled.
- Fixed the output to the log file, it now no longer opens/closes the file on
  each line.

New in version 104:
- When you use ConfigManager the ServerPackage will automatically be added or
  removed when needed.
- Fixed the TeamSay message

-------------------------------- INSTALLATION -------------------------------
Copy the .u and .int files to the UT2003 System directory.
If you have ConfigManager installed on your server you just have to restart
the server and ChatFilter will automatically be installed. If you don't have 
ConfigManager installed do the following:

Open up your server configuration (UT2003.ini) and add the following line:

  [Engine.GameEngine]
  ServerActors=ChatFilter.ChatFilter

Now when you start your server you should see the following lines in the log:

  [~] Loading ChatFilter version 104
  [~] Michiel 'El Muerte' Hendriks - elmuerte@drunksnipers.com
  [~] The Drunk Snipers - http://www.drunksnipers.com

------------------------------- CONFIGURATION -------------------------------
The configuration of the behavior of ChatFilter resides in the server 
configuration file (UT2003.ini). Add the following lines to the file:

  [ChatFilter.ChatFilter]
  fTimeFrame=1.0000
  iMaxPerTimeFrame=2
  iMaxRepeat=1
  iScoreSpam=1
  CencorWord=*****
  iScoreSwear=1
  iKillScore=10
  KillAction=CFA_Nothing
  BadWords=asshole
  BadWords=fuck
  ...
  ...
  bCheckNicknames=false
  bLogChat=false
  sLogDir=""
  sFileFormat="ChatFilter_%P_%Y_%M_%D_%H_%I_%S"

fTimeFrame
  Set the number of seconds of a single time frame
iMaxPerTimeFrame
  Maximum number of lines allowed per time frame
iMaxRepeat
  The maximum times a player can say the same line in a row
iScoreSpam
  The score to add when a player exceeds the iMaxRepeat value
CencorWord
  Text to replace BadWords with
iScoreSwear
  The score to add for every bad word
iKillScore
  The maximum score a player may have before actions will be taken
KillAction
  Action to take against the player:
    CFA_Nothing     do nothing
    CFA_Kick        kick the player
    CFA_Ban         ban the player
    CFA_SessionBan  ban the player for this game
    CFA_Defrag      remove one point of the players score
BadWords
  Words that are considderd bad/swearing. By default no words are added
bCheckNicknames
  Check the players nick name for BadWords. When you enable this feature 
  you must add ChatFilter to the ServerPackages list.
bLogChat
  Save the chat to a log file
bLogDir
  The directory where to store the log files, this has to end with a slash,
  and the directory has to exist before your start UT2003
sFileFormat
  The format for the log filename.
  You can use the following replacements:
    %P  server Port
    %Y  current Year
    %M  current Month
    %Y  current Day
    %H  current Hour
    %I  current mInute
    %S  current Second
    %N  server Name
  Not all characters are supported in the filename, for example '.', these will
  be translated to an underscore '_'

The log file generated will start with a line with the date the log started:
  --- Log started on 2003/2/28 21:17:40
After that you will get the log files in there field (seperated by tabs)
  time  tag  playername  message
Tag is one of the following:
  CHAT, TEAMCHAT, SPAM, TEAMSPAM
The lines are uncensored (the bad words are not filtered)

--------------------------------- SOURCE CODE -------------------------------
BullShit is provided under the GPL. The complete source code is available
from the website. Please respect the GPL:
                      http://www.gnu.org/licenses/gpl.txt

----------------------------- CONTACT INFORMATION ---------------------------
ChatFilter has been written by Michiel 'El Muerte' Hendriks 
<elmuerte@drunksnipers.com> member of The Drunk Snipers (TDS for short)
If you have any questions you can contact me, but I will not reply to 
questions who's answers can be found in this document.

The latest version of this server add-on can be downloaded from: 
http://www.drunksnipers.com/services/ut/ut2003/chatfilter

-----------------------------------------------------------------------------
Michiel 'El Muerte' Hendriks                        elmuerte@drunksnipers.com
The Drunk Snipsers - ICT Solutions                http://www.drunksnipers.com
-----------------------------------------------------------------------------