TOST 1.4 - A Server(Admin) Tool for Tactical Ops 2.2 Beta
=========================================================


Authors in the past:
Creators: BugBunny, MadOnion, 2002
Updated by FilRip in 2003

Today's 2.2 TOST-Team, responsible for updates and maintance: General_T, Shaydee

Shaydee's special thanks go to Fearless and Just_Me for help on the OpenGL whitelist.


	1 	- Installation
	2 	- Version History
	3 	- Reference of INI variables
	3.1 	- your server INI
	3.2 	- GIDServer.ini
	4 	- GID/PGID FAQ
	5	- Flags
	6	- Ban Lists
	7	- Console Commands
	8	- Extended Query Protocol
	9 	- Registration Synch Module/Protocol
	10	- Configuring the file-check


1 - Installation
================

1) Copy/unzip TOST14.u to your UT/system directory
    and TOSTTex.utx to your UT/textures directory.

2a) If you have AdeAway2 installed remove these lines in the [Engine.GameEngine] section of your TacticalOps.ini / UnrealTournament.ini:
     ServerPackages=AdeAway2
     ServerActors=AdeAway2.AdeAwayServerActor

2b) Add/edit following lines to/in the [Engine.GameEngine] section of your TacticalOps.ini / UnrealTournament.ini:
     ServerPackages=TOST14
     ServerPackages=TOSTTex
     ServerActors=TOST14.TOSTServerActor

2c) After the first mapchange your server will have some new entries
     in its INI file. For a description of these settings, see below.

  IMPORTANT
  If you are using the TOMapVote mutator, edit the UsedPackages line to
     UsedPackages=TOMAPVOTE100
  or
     UsedPackages=TOMAPVOTE10M
  (depending on the TOMapVote version you use)

3) Restart your server. If you don't have shell access, your provider probabaly has a startup script running.
    In this case login as admin on your server and restart it with the "admin quit" command.
    Note: Changing the map or restarting it via WebAdmin won't work, because the *.ini will not be loaded.
4) Place the TOSTHelp.ini file into the same directory in which your server
	has placed the GIDServer.ini file. 

2 - Version History
===================

Version	Date                  	Author		Changes
1.0	01.03.2002	09:00	BB/MO/HK	+ First Release
1.1	13.03.2002	09:00	BB/MO/HK	# Jolt Logo bug fixed
						# WebConsole say/teamsay commands work again
						# RememberStats messages removed due to common request
						# RememberStats works now on shared IP lines (needs more testing)
						# added option to resolve some problems with packages conflicting with TOST (TOMapVote)
						+ INT file is gone, now uses your servers INI file (see notes below)
						+ AllowHUDExtensions admin setting
						+ xkick/xpkick commands (see below)
						+ added old AdeAway2 showweapon mode (use showweapon twice)
						+ detect some additional hacks
						# other minor fixes
1.2	01.04.2002	09:00	BB/MO/HK	+ more hacks detected
						+ echo command (use this to message something to yourself in your scripts)
						+ alternative vote system avaiable (see below)
						+ remembers user preferences for TeamInfo/weapon HUD on client side
						+ admins can not be voted out of the game anymore
						# #T macro now linked to HUD id system
						# other minor fixes
1.3 /1.31	???		FilRip		+ package checks
						+ rapid waters waterfall bug fixed
						+ flybug fixed
						+ a lot more that kept us safe for quite a while
1.4.0	20.10.2004		GenT/Shay	+ TostLog2
						+ GID Engine with a ton of new commands
						+ complaints
						+ hardcoded checksumes for UT436/UT440/UT451 packages that allow a server to run a different version than the clients
						[DO NOT USE THIS VERSION ANYMORE]
1.4.0b	23.10.2004		GenT/Shay	# mkteams bug fixed (player was able to switch back instantly)
						+ Protection against Helios 3.1
						+ switchteam command
						[DO NOT USE THIS VERSION ANYMORE]
1.4.0c	05.11.2004		GenT/Shay	+ extended IP bans
						+ rscreen command
						+ registration synch module
						[DO NOT USE THIS VERSION ANYMORE]
1.4.0d	16.11.2004		GenT/Shay	# annoying bug in 'regs' command fixed
						# bug fixed that allowed players to "hijack" another player's scores
						# rscreen now displays the time taking the screenshot took on the client side
						# skinhack check more sensitive
						# prevent a player from kicking a superior player (K can't kick B, etc...)
						+ optional logger for all "set" commands a client performs
						+ new flag: I (invisible/hidden)
						+ an additional extended UDP query
						+ check for .dll files
						+ DED2 fix
						


3 - Reference of INI variables
==============================

3.1 - Your server's INI file
----------------------------

[TOST14.TOSTServerMutator]
SecurityFrequency=5		// How often should the server call the client (dont modify)
SecurityTolerance=20		// How long before the client is overdue (in secs) (dont modify)
SecurityLevel=1			// Actions performed on cheats : 0=None, 1=Kicked, 2=Kickban
				// Note: some checks do not obey SecurityLevel=0
MaxInitTries=15			// How many times should TOST tries to connect to the client initially (dont modify)
UseTOSTLog=True			// Create separate TOSTLog files
UseTOSTLog2=False		// Create extra logfile with player IP addresses
UseTOSTLog3=False		// obsolete
Log2UpdateFrequency=1000	// frequency with which TostLog2 is updated (better not modify)
ProtectionTime=120		// Defines how long a ProtectSrv command protects the server with a random password
AllowOtherVoicePacks=False	// Allow other voice packs
RememberStats=True		// Creates a player backup and re-assignes the score after a reconnect
AllowHUDExtensions=True		// allow the HUD extensions (showweapon/showteaminfo)
UsedPackages=			// exclude listed packages from some incompatible TOST checks, packages names are separated by ";"
				// for example : UsedPackages=TOMAPVOTE100;DEONLY
				// NOTE : only add packages that are conflicting with TOST for security reasons
				// current known conflicting packages : TOMapVote (TOMAPVOTE100, TOMAPVOTE10M)
EnhVoteSystem=True		// use enhanced voting system (every negative frag point will need you one vote less to be kicked)
SecureFNade=True		// use server side controlled flashbang
bLogClientSetCommands=False	// log "set" commands a client performs into the server's logfile
bKickEraseStats=True		// erase player stats after a TOST kick
bNoUpSwimming=True		// fixes the waterfall bug on rapid waters
bDEDFix=True			// disallowes all non-pistol weapons on DED2
CheckFile[0-9]=			// files to be checked when a client connects
AllowedChecksums[0-9]=		// whitelist of checksumes for the checked files (see below for more information)

[TOST14.TOSTQuery]
QueryPort=0			// defines the port on which the extended TOST UDP query
				// is supposed to listen. Leave this setting at "0" to keep 
				// this feature disabled
QueryPassword=			// password that is required for the extended TOST UDP query
				// for more information on the extended queries, see its seperate documentation

3.2 - GIDServer.ini 
-------------------

[TOST14.GIDServer]
NickCheckFrequency=10		// frequency with which TOST checks for nickchanges (don't modify)
CleanBansFrequency=10000	// frequency with which TOST checks if a PGID ban has expired
bAllowRegister=True		// allow players to use the "register" command
bAllowHideReg=True		// allow players to assign an I flag to themselves with the "hidereg" command
bShowNickChanges=False		// send a notice to all players when one player changes his nick
bCreateGIDs=True		// server assigns GIDs to everyone who doesn't have one 
				// (dont mess with this setting unless you know what you are doing)
bAllowComplaints=True		// allow players to use the "complain" command
bEnablePGIDBans=True		// use IPPolicies bans only or PGID+IPbans (rban command)
bEnableGIDEngine=True		// enable/disable the whole GID engine. only turn it off if you know what you are doing.
GIDMinAgeHours=0		// minimum age the GID of a player has to have for him to be able to join the server
				// leave this feature disabled if you don't know what you are doing
GIDLastIP			// partial IP address that will not receive a new GID
				// TOST overwrites this setting every time a player
				// receives a new GID, or when a player is banned.
				// this prevents players from generating many GIDs in a row
				// don't change this setting, because TOST will always overwrite it
R[0-2047]=			// player registrations. please use console commands to modify
				// registrations.
B[0-255]=			// GID Bans. please use console commands to modify these.
XB[256]=			// extended IP bans
C[0-19]=			// Complaints. use console commands to modify these.
RegBuffer[0-255]=		// history of deleted registrations. TOST is using these
				// only to synchronize registrations. keep your hands off!


[TOST14.TOSTSync]
SyncURL=None			// URL of the central sync script. "None" means that the sync module is disabled.
SyncPort=80			// port the remote webserver is running at
SyncServerName=None		// your server's name for the central server
SyncServerPassword=None		// your server's password for the central server
bAllowReceiveXBans=False	// allow central server to set extended IP bans
bAllowReceivePGIDBans=False	// allow central server to set PGID bans



4 - GID/PGID FAQ
================

F: How does registering my nickname work ?
A: Your TO2.2 Client has a unique key-code which is called PGID. When you
register your nickname, the server will always correlate your PGID with your nickname.

F: What is a GID, and what's the difference between a GID and a PGID ?
A: A GID is your Global IDentification. You can see it as your secret password
on the TO2.2 servers. The PGID, on the contrary is your Public Identification. 

F: Why do I need a PGID for and why is it public ?
A: When you join a server, your TO2.2 client sends your GID (not the PGID) to the server.
Out of your GID it will then calculate your PGID. This is a safe transformation, because
you can only calculate a PGID out of a GID, but it is (almost) impossible to create the
GID out of a PGID. When you, for example register your nickname, the server will keep your
PGID (not the GID) in mind.
You can give the PGID to anyone, because they will not be able to use it without your GID.
The GID, however, should be kept secret.

F: Where does my GID come from ?
A: If you do not have a GID, a server will generate one for you.
It then will be placed into your TacticalOps.ini file, which looks like this:
	[TOST14.TOSTGIDClient]
	GID=955SYYH115710403E61
	pgid=P23489034

F: I reinstalled my TO2.2, and now I can't use my registration anymore
A: If you have a backup of your old GID, then you will have to write it back into
your TacticalOps.ini file. If you want to avoid trouble, just create a backup of your
whole TacticalOps.ini file.
Since the GID is a secret key, none of the server admins will be able to give you your
GID in case you lost it. GIDs are never saved on the servers.

F: My GID is lost, but I want to have my old nickname back.
A: You will have to ask a server admin to remove the old registration.

5 - Flags
=========

Registered players can have a range of flags, each of which gives them a privilege.
As of TOST140d there are the following flags:

R - player is registered (all registered players have this flag)
C - player is registered and currently using his registered nickname
	(this flag can not be assigned manually)
A - this players registration has been approved by an admin
K - player has permission to kick others
B - player has permission to kick and ban others
M - registration manager, can add/modify/delete registrations
I - this players's registration is hidden

6 - Ban Lists
=============

As of TOST140d there are three ban-lists: 
- The classic IPPolicies list
- The list of banned PGIDs
- Extended IP Bans

What the PGID ban list does should be self evident, if you have read the GID/PGID FAQ.
But you might wonder why there is an third ban list, which sounds as if it does 
the same like the IPPolicies ban list. Well, actually it does to the same, with 
three exceptions:
1.) The syntax is different
2.) It works on players only (not spectators)
3.) An A-Flag (=white/green R) can override the ban
This basically means: You can ban a huge range of IP addresses, but you can still let
certain people within this range join the server. This is meant for scenarios in which
one or more players ought to be excluded from a server. The problem with this usually is
that there are other, innocent, people within the same IP range. The solution is to give
those innocent people an A-Flag, so that they are not affected by this ban. 
The syntax for this list is rather simple, and aimed to cover a huge range of IP addresses
with just one entry. These examples should give you an idea about how it works:
addxban 127.0.0.1        - bans the IP address 127.0.0.1
addxban 127.0.0-5.3-20   - bans all IP addresses between 127.0.0.3 and 127.0.5.20
			  that includes (among others): 127.0.1.20, 127.0.5.6, ...


7 - Console Commands
====================

You can review a list of console commands by typing "help" into the 
console. If the help file was not installed, you can also take a look
at the seperate command documentations.

8 - Extended Query Protocol
===========================

Please see seperate document for information on this protocol

9 - Registration Synch Module/Protocol
======================================

Currently there is no documentation for this.


10 - Configuring the File-Check
===============================

As mentioned above, in your INI file you can specify file names of files that will be checked
on the client side. You can add up to 10 files to the check list. 
By default you will  have the following entries:

CheckFile[0]=OpenGLDrv.dll
CheckFile[1]=opengl32.dll
AllowedChecksums[0]=1692855861,-888144463,808584516,163168978,1630530848,-1201889541,-894046234,233494586,975544875,-21625913,884855173,-581347532,-312523665,-716506754,348985950
AllowedChecksums[1]=all

This means that two files will be checked on the client's side: OpenGLDrv.dll and opengl32.dll.
For OpenGLDrv.dll (File #0) there are also 6 checksumes. This is the white-list of checksumes
that are allowed for this file. 
Opengl32.dll (File #1), does not have any checksumes listed. "all" means that all checksumes
will be allowed. However, TOST also has a hardcoded blacklist of hacked files. If no whitelist was
specified, then only the hardcoded blacklist will be used. 

Unfortunately there is no additional tool which lets you generate the checksume of a file. If you need
to create a checksume, you will have to do the following:
1.) add the file to the CheckFile[0-9] list (server sided!)
2.) "install" the file on your game client
3.) connect to the server. the server will now perform a check on this file.
4.) in your server's logfile you will see the checksume of your file

Note: Checksumes are seperated by a ','. Make sure that there are no whitespaces inbetween !
You should only mess with these features if you know what you are doing! If you have never done this before, then
you ought to test it in a testing-environment and not on a live-server.


	===>>	The ToST Team can not be held responsible for any damages that this program causes <<===
				===>>  use it at your own risk! <<===
