
               -----------------------------------------------------
                 -------------------------------------------------  
                 Instructions for plugin_gnc_filtersay.sma 1.0    
                 -------------------------------------------------  
               -----------------------------------------------------
                          Last revised 16:07 21/06/2002

	1) How do I install this?
	2) What extra functions does this add to my server?
	3) How do I use the new functions?
	4) It isn't working, what is wrong with it?
	5) Any questions??

-----------------------------------------------------------------------------------
///////   1) How do I install this?  //////////////////////////////////////////////
-----------------------------------------------------------------------------------

-----Win32------

1) Place the uncompiled .sma in ../halflife/admin/scripting/myscripts.

2) Edit the .sma in a text editor.Dont forget to add the command you want 
   to log to the "loggedcmds.ini" file.

3) Doubleclick the compile_all.bat 

4) Find the ../halflife/admin/scripting/mybinaries directory and copy the 
   .amx files. 

5) Paste the .amx files into the ../halflife/{moddir}/dlls directory. 

6) Add the names of the plugins to the plguin.ini in the {moddir}, ie for 
   plugin_gnc_filtersay.amx add "dlls/plugin_gnc_filtersay.amx" near to the
   TOP of the file. It should NOT come before the antiflood or adminlog
   plugins.

7) Set file_access_read and allow_client_exec to 1 in your server.cfg
   If you dont, this will NOT work!!!!

8) Paste the filter.txt into the {moddir}.  Edit it to include any profanities
   you wish to be filtered.  Please note that you MUST put the "'s around things
   or it will produce some odd (and often humourous) phrases.  If you put more 
   than 40 lines in the filter.txt, you MUST find the line "#define MAX_WORDS 40"
   in the original source ".sma" file and change the 40 to something higher 
   otherwise it will ignore anything after the first 40 filters.

-----Linux------

As Win32, but use compile_all.sh instead of compile_all.bat

-----------------------------------------------------------------------------------
///////   2) What extra functions does this add to my server?  ////////////////////
-----------------------------------------------------------------------------------

The extra functionalities it has are as follows.

 * This simply monitors all say commands.  Every time it sees a word it is 
   watching for, it replaces it with the humourous alternative.

 * It is configured from a text file, which is just excellent, no?

-----------------------------------------------------------------------------------
///////   3) How do I use the new functions?  /////////////////////////////////////
-----------------------------------------------------------------------------------

The plugin itself is designed to be install and forget.  The only thing you should
need to do is add lines to the filter.txt

*** Notes on adding stuff to the filter.txt ***

You should not add multiple and similar filters.  For example

"damn" "beaver home"
"Goddamn" "blasphemey"

as the second will be redundant.  Reversing the order will cause goddamn to be 
filtered and replaced and damn will still be filtered seperatly.

DO NOT CAUSE A LOOP!!!!!

An example of a loop is 

"homo" "homosexual"

This will cause some odd effects, on of which is for the following phrase to occur 
OR the server to hang.

say homosexualsexualsexualsexualsexual

as it replaces it over and over again.  There is now a limit (set by "MAX_LOOPS" at 
the top of the .sma file), the higher this is set the better, BUT if you accidentally 
create a loop your server WILL topple over.  YOU HAVE BEEN WARNED!!!!

Also, note at the top of the file the lines

"$" "s"
"@" "at-symbol"
"!" "i"

These are commonly used characters to replace the characters and fool swear blockers.
These lines force the characters to their common counter-parts making the loops 
smaller and quicker to configure.  The only problem is if you add too many then it 
becomes impossible to write pretty much anything useful (these WILL effectively 
disable e-mail addresses, but you could not use @ss etc...) 

-----------------------------------------------------------------------------------
///////   4) It isn't working, what is wrong with it?  ////////////////////////////
-----------------------------------------------------------------------------------

Okay, a list of symptoms and problems in the order that you ought to check them.....

Symptom		- It is not doing any filtering.
Possible Causes	- It cant find the "filter.txt".  Make sure it is in the {moddir} (eg 
		  cstrike) and is in a simple text format (ie, edited with Notepad, NOT 
		  Word).
		- File_access_read and/or file_access_write are not set to 1.  They BOTH 
		  need to be set to 1.

Symptom		- It is filtering stuff, I just cannot see the humourous edits.
Possible Causes	- You probably dont have "allow_client_exec" set to 1 or something
                  else is blocking the "say" command

Symptom		- My server hangs when I try to swear.
Possible causes - This will be caused by one of the filters filtering another filter,
		  thus causing an endless loop.  Make sure that none of the "good" 
		  phrases is filtered as a bad phrase.
		  I CANNOT STRESS THIS POINT STRONGLY ENOUGH!!!!!
		  If this problem occurs, please re-read section 3.

I have not found any other problems, if you find one, please tell me......

-----------------------------------------------------------------------------------
///////   6) Any questions??  /////////////////////////////////////////////////////
-----------------------------------------------------------------------------------

Author     - Joe "Caveman" Noyes

A/S/L      - 20/Male/Exeter and Droitwich Spa, England.

ICQ#       - 70710878
Home Page  - http://gosh.ex.ac.uk/~py99jan/
E-mail/MSN - dmcaveman@hotmail.com

Author     - Geoff "SR71Goku" Hichborn

A/S/L      - 16/Male/California, USA.

ICQ#       - 146538715 
Home Page  - http://sr71goku.tripod.com/
E-mail/MSN - sr71goku@hotmail.com

Also, thanks to PilotMan for his filter.txt, the original concept and finding the first bug.