Waradmin mod v0.03beta
By Dessignator
----------------------

Introduction
------------

Howdy ho!

	Here's a quick & easy waradmin thingie for you die-hard q3a pple who can't wait
	to play a decent war, using elected admins or server admins through passwords. 
	This is not a fully-fledged waradmin system, yet, but allows you to play a war 
	after all, for the time being.

Features
--------

	Each time the match is paused, the mod calculates the overtime and adds that to
	the timelimit, so playtime will be the same as intended. The client side timers
	still continue to run, but this is a q3a design limitation. The state of all 
	powerups/items are saved when paused(client powerup timers still count down, 
	but this is compensated on resume).
	Elected admins and serveradmins can set a password on the server themselves.
	If server is empty, the server password will be reset to the original one.

Installation
------------

	Just put the .pk3 file in the baseq3 directory, and make sure it's 
	lexycographical the last .pk3 file which contains qvm's in the directory.
	(in other words: just copy it in baseq3 subdir)
	Just start the server as you'd normally do.
	There are 2 new Cvars: 
	-   g_adminpassword <adminpassword> to set the adminpassword for serveradmins 
		(g_adminpassword "none" (default) to disallow this feature).
	-   g_electadmin 1 or 0(default) to allow clients to use \callvote elect

	admins.cfg & admin rights
	=========================
	
	The file baseq3\admins.cfg specifies the custom-admins the mod will support(off by 
	default). 
	Elected admins have the following rights:
		fraglimit, timelimit, capturelimit, startmatch, stopmatch, pause, map, lockchat, 
		forceteam, lockteams
	Serveradmins have all the rights:
		fraglimit, timelimit, capturelimit, startmatch, stopmatch, pause, map, pass,
		maxclients, lockchat, forceteam, kick, lockteams
	Custom admins default rights are the same as elected admins, though the following rights
	can be set manually in admins.cfg:
		pass(P)/maxclients(M)/kick(K)
	
	Adding an entry like <user> <password> <rights(PMK)> in admins.cfg will create a admin
	with the specified rights, i.e. 
	superadmin dumbpassword PMK 
	to allow the admin to use all the rights yet (Pass, Maxclients, Kick).
	
Usage
-----

	Becoming admin
	==============
		- To become an elected admin the server has to set g_electadmin cvar to 1 and has
		  to allow voting(g_allowVote 1).
		  Type in console: \callvote elect and the elect procedure goes the same as any 
		  other callvote.
		- Using the serveradmin password, the server has to set g_adminpassword, and the 
		  client has to use \cmd admin <password> to become admin.
		- To become a custom admin, with rights specified by the server in admins.cfg
		  (see section admins.cfg)
		  Type in console: \admin <username> <password>
	
	Using admin
	===========
	
		\adm fraglimit [number]
			change fraglimit
		\adm timelimit [number]
			change timelimit
		\adm capturelimit [number]
			change caplimit
		\adm startmatch [seconds=10]
			start a war, basicly it just uses map_restart
		\adm stopmatch
			stop war/match to intermission
		\adm pause
			pauses the game (the timer continues, but this is compensated by overtime)
			all entities/powerup info has 
		\adm map <mapname>
			changes map
		\adm pass <password|"none">
			changes password on server, use "none" to erase password
		\adm maxclients	[number]
			changes sv_maxclients on server
		\adm lockchat
			disallows pple to use 'say' or messagemode1, so they can only use teamchat
		\adm forceteam <playername> <red(or r)|blue(or b)|spectator(or s)|follow1|follow2>
			forces player to another team -red/blue/spectator
			the mod filters color codes, so you don't have to figure that out manually
		\adm kick <playername>
			kicks player from game.
			filters color codes from players, like forceteam
		
		The []'s mean an optional argument, and the <>'s mean a required command.
		
		Future versions will have a nice gui and all, but this requires admins to 
		install a cgame qvm(and some time/coding effort :).
		Using cmd for every command is necessary, else a cgame qvm had to be installed 
		as well on the admin client - and this makes the admin unpure, which doesn't 
		seem to me to be a good reason enough to make a seperate cgame qvm (with 2 
		lines of code added or so).
	
Note
----
	
	This is a direct edit from the q3a point release source, so only 1.15c 
	versions can use it. When linux point release is out, this little mod would 
	really be extensively tested I guess.

Happy fragging!
Dessignator - 17/1/2000
member of clan Never Underestimate These Suckers - www.nut5.com

contact me at dessignator@nut5.com for comments/bug reports/suggestions etc.

Future fixes
------------
-Stop counting down powerups(quad/haste etc) client side when paused.
-Remove client side phonejack stuff when paused
(these are only client representation problems)

History
-------

v0.01beta - Initial release.

v0.02beta - fixed putting back original g_password when server is empty
			fixed losing adminstate after map restart

v0.03beta - implemented custom admin support through admins.cfg, disallowed
			elected admins to kick, change password etc(wh00ps).
		  - found out \cmd is not necessary to prefix server commands, though
		  	tab completion fails.
		  - added lockteams

Disclaimer
----------

THIS SOFTWARE IS SUPPLIED AS IS.  THE AUTHOR DISCLAIMS ALL WARRANTIES,
EXPRESSED OR IMPLIED, INCLUDING, WITHOUT LIMITATION, THE WARRANTIES
OF MERCHANTABILITY AND OF FITNESS FOR ANY PURPOSE. THE AUTHOR ASSUMES
NO LIABILITY FOR DAMAGES, DIRECT OR CONSEQUENTIAL, WHICH MAY RESULT
FROM THE USE OF THIS SOFTWARE.
