******************************************************
*                                                    *
* UQSA ZBOT Detector DLL v0.94 beta for Quake2 v3.19 *
* (c) Shane Powell 1998                              *
*                                                    *
* Date: 03 November 1998                             *
*                                                    *
* Solaris x86 release                                *
*                                                    *
* http://quake2.abilene.com/uqsa/bot/                *
* http://www.planetquake.com/eclipse
*                                                    *
******************************************************


It's interesting how may zbot detect mods came out of nowhere!!!  
It's good to see.  Hopefully this will be another tool in the 
downfall of the zbot.  

This zbot detector dll will add zbot detect support for all mods 
seamlessly without the server admin's needing to do anything with 
source code.  No complex setup.  Just install and run.

The life of this dll may not be long as support for zbot detection 
is added into all mods.


Files:
------

  zbot.sh
  zbotdetect.so
  zbotdetect.cfg
  readme.txt


Install:
--------

Unfortunately the sparc version of the zbot detector isn't as easy 
as the win32 version to install.
The sparc version has to be setup per mod that you wanted protected.  
I've tried to make the install as simple as possible but I assume 
that linux server admin's will have enough knowledge to follow my 
instructions.  



Normal Install:
---------------

PLEASE READ ALL OF BELOW TO INSTALL!!!!


1. Stop server.
2. Uncompress zbotdetect-0.94.tar.gz into the quake2 directory.  
   e.g. "tar zxf zbotdetect-0.94.tar.gz"
3. edit the zbotdetect.cfg file and change the default password and 
   any setting that you want.  See comments
   in zbotdetect.cfg for detailed description of all the cfg commands.
4. For each mod that you want to protect, copy the following files into 
   the mod directory.
    install
    zbotdetect.so
    zbotdetect.cfg (optional, only if you want customized mod zbot config 
    rather than using the gobal zbot config)
5. Run "install" once. (e.g. ". ./install")
6. Start server as normal.




Install Notes:
--------------

The "install" script moves the old gamesparc.so to gamesparc.real.so and 
moves zbotdetect.so gamesparc.so.  If the install script is run again the 
files are moved back to there original names.  This can be used to 
uninstall or enable / disable the detect bot code.




Per mod configuration:
----------------------

The zbotdetect.cfg in the quake2 is the "global" config settings.  These 
can be overwritten by a zbotdetect.cfg exists in the mod directory that 
the server is running.  This allows for seperate settings can be setup for 
each mod the server is running.  For example if you are running a mod that 
already has zbot detection and you wanted to turn off zdot detection in 
this dll but only when running that mod.  Copy zbotdetect.cfg into the mod 
directory.  Edit the zbotdetect.cfg and set "zbotdetect" to "0".



Admin Interface:
----------------

A quake2 client can check / set most of the zbot detect configuration values 
if he/she wants to.  To use the admin interface you must first login.  The 
login lasts for the length of the current level.

All admin console commands start with a "!"

From the quake2 console type in "!setadmin <password>".  The default password 
is "secret" so you would type in "!setadmin secret" if you where running with 
the default setup.

If you typed in the correct password, the dll will say "ZBOT detect Admin mode 
active".

Here is the list of commands while in admin mode:

"!displaylogfile"
  Displays the contents of the logfile to the console.

"!clearlogfile"
  Deletes the contents of the logfile.

"!uselogfile"
  Displays if logging to a file is on (1) or off (0). 

"!uselogfile <0/1>"
  Sets logging to a file is on (1) or off (0). 

"!clientsidetimeout"
  Displays the number of seconds for the zbot detect to timeout waiting for 
  a client.  60 seconds is the default value.

"!clientsidetimeout <seconds>"
  Sets the number of seconds for the zbot detect to timeout waiting for a 
  client.  You can't set this value less than 5 seconds.  You shouldn't need 
  to touch this value at all. Mainly used for internal development testing.

"!logfilename"
  Displays the name of the log file.

"!logfilename <filename>"
  Sets the log file name.

"!disconnectuser"
  Displays if a user detected with a zbot will be disconnected or not (kicked).
  0 = no and 1 = kick.

"!disconnectuser <0/1>"
  Sets if a user detected with a zbot will be disconnected or not (kicked).  
  0 = no and 1 = kick.

"!displayzbotuser"
  Displays if a user detected with a zbot will be announced to all the people 
  on the server.  The message to be displayed is setup in the zbotdetect.cfg 
  file only. 0 = not displayed and 1 = displayed.

"!displayzbotuser <0/1>"
  Sets if a user detected with a zbot will be announced to all the people on 
  the server.  The message to be displayed is setup in the zbotdetect.cfg file 
  only. 0 = not displayed and 1 = displayed.
  
"!numofdisplays"
  Displays the number of times that a user is using zbot message will be spammed. displayzbotuser must 
  be set to 1.

"!numofdisplays <number>"
  Sets the number of times that a user is using zbot message will be spammed. 

"!displayimpulses"
  Displays if clients generating impulses will generate messages.  Impulses are
  the method used to control most of the zbot.  The problem is that impulses 
  can be generated by a normal client as well.  Very very unlikely as no mod's 
  that I know of use impulses but it could happen.  So you can't be 100% sure 
  that the person is using a zbot or not. 0 = no and 1 = yes.

"!displayimpulses <0/1>"
  Sets if clients generating impulses will generate messages. 0 = no and 1 = yes.

"!logzbotimpulses"
  Displays if the known zbot impulses are logged to the log file or not. 
  uselogfile must be set to 1 for this setting to work. 0 = on and 1 = yes.

"!logzbotimpulses <0/1>"
  Sets if the known zbot impulses are logged to the log file or not. uselogfile
  must be set to 1 for this setting to work. 0 = on and 1 = yes.

"!logimpulses"
  Displays if the impulses other than the know zbot impulses are logged to the 
  log file or not. uselogfile must be set to 1 for this setting to work. 
  0 = on and 1 = yes.

"!logimpulses <0/1>"
  Sets if the impulses other than the know zbot impulses are logged to the log 
  file or not. uselogfile must be set to 1 for this setting to work.
  0 = on and 1 = yes.

"!zbotdetectactivetimeout"
  Displays the time in seconds that the zbot detect dll will wait after it has 
  detected the user is using he zbot until the spam message is displayed and 
  the user is kicked. (depending on displayzbotuser and disconnectuser)  If it 
  is set to -1 the timeout is random based on a upper limit of 
  randomwaitreporttime.

"!zbotdetectactivetimeout <seconds>"
  Sets the time in seconds that the zbot detect dll will wait after it has 
  detected the user is using he zbot until the spam message is displayed and 
  the user is kicked. (depending on displayzbotuser and disconnectuser)  
  If it is set to -1 the timeout is random based on a upper limit of 
  randomwaitreporttime.

"!randomwaitreporttime"
  Displays the upper limit of the random time in seconds to wait.  See 
  zbotdetectactivetimeout.

"!randomwaitreporttime <seconds>"
  Sets the upper limit of the random time in seconds to wait.  See 
  zbotdetectactivetimeout.




Credits:
--------

Writen by Shane Powell (KillerBee) 
killerbee@quake2.bitstreet.net
http:\\www.teamevolve.com


Mike (McNasty) for beta testing and for bugging me enough to write this dll 
in the first place.

Brett (Kai) for his support in getting this into the correct hands.

#Cookie for input and advice.

Mentor for allowing me to beta-test on his server.

ElectricMonk for programming advice and input.

Matt (Fisty) for porting to linux.

Chief Bastard for linux server testing.

United Quake Server Administration for hosting / beta testing / etc.
http://quake2.abilene.com/uqsa/





Other:
------

The methods used to detect the zbot where not copied from anyone else. 
I use a 3 different methods to detect the zbot.  

Current platforms supported: win32, Solaris Sparc, Solaris x86 and linux.  

If enough people want I'll port it to other platforms as well.

If there is a feature that you would like added email me at 
killerbee@quake2.bitstreet.net and I'll think about adding it :)

Goto zbot detect homepage for the latest version or for other platform 
versions of zbot detect.

http://quake2.abilene.com/uqsa/bot/





Copyright and Distribution Permissions:
---------------------------------------

This patch is freely distributable provided that this readme.txt is 
distributed as well and is unchanged.

All code is Copyright Shane Powell 1998.

DISCLAIMER:  This patch is 100% safe, tested, and FDA approved,
so you should have no trouble with it. But if you do.. its not our fault.
DLL's always carry an inherent risk for servers!



History:
--------
v0.92 beta - 19 October - First public release for Win32 version
v0.93 beta - 21 October - First public release for Linux version
v0.94 beta - 22 October - Fixed bug with normal dm servers not loading. 
                          Win32 version only atm, linux update soon.
v0.94 beta - 23 October - Renamed to 'UQSA ZBOT Detector' and moved to a new 
			  web site and the release of the linux release.
v0.95 beta - 26 October - Added quake2dirsupport for windows version only in 
			  zbotdetect.cfg.
                        - Added customclientcmdconnect to zbotdetect.cfg
                        - Improved performance.
                        - Fixed command overflow problem.
