NAME
    combats - start Virtual Combat server

SYNOPSYS
    combats [-bg] [server options]

DESCRIPTION
    Starts up the Virtual Combat server.
    The following initialisation steps are performed:

	[1] If one of the following directories exist then the server
	changes directory into it:

	UNIX version:
	    /usr/local/games/vircom-2.0
	    /usr/local/games/vircom

	Windows version:
	    C:\VIRCOM20
	    C:\VIRCOM

	[2] Server options are read from the options file and from the command
	line.

	[3] If the -bg option has been specified then the server forks off a
	child process and exits (UNIX version only).

	[4] A socket is set up to listen for player connections.

	[5] The "hosts" file is updated to contain the address and port
	number of the server.

	[6] Initial robots are forked off.
    
    If the server is not started in the background (with the -bg option)
    then logins will be accepted from standard input, allowing you to
    log in by typing "login" into the server (UNIX version only).
    Anyone who logs in this way will automatically have "admin" status,
    meaning that they will have access to certain extra commands, such
    as for shutting down the game or stopping games.  If a player has
    admin status and has a password then the admin status will be saved
    along with the player's password when he leaves the game.

    The server can be shut down by logging into the game as admin and 
    typing "shutdown", or else by sending SIGINT (by pressing ctrl-C) or
    SIGTERM (kill <process num> under UNIX) to the server process.  Each
    of these methods will shut down the server and save the scores of
    any players logged on, but typing "shutdown" is generally safer,
    especially if a game is in progress.

OPTIONS
    -bg
	Starts the server up as a background process.  This should be
	used instead of simply typing "combats &".
	This option must be specified before any other server options.
	This option is not available on the Windows version of the server.

    Other configuration options can be placed on the command line or
    in the file ".combatsrc" ("combats.rc" for the Windows version of the
    server).  Command line options override options in the options file.  
    Each option has the form "Option=Value".  If an option is not specified 
    in either the options file or on the command line then the default 
    value for the option is used.  The following options are recognised:

    AllowMultipleLogins
	Type: boolean
	Default value: True
	Description: If this option is set to False then only one player
	can be logged in from a given IP address (except robots and admin).
	
    World
	Type: string
	Default value: compound
	Description: Specifies the world directory to use for the game.  
	World directories are contained in the "worlds" directory.  
	The world directory can also be changed during the game by
	typing "world <world dir>".

    PortNumber
	Type: integer
	Default value: 4839
	Description: This option changes the port number which the server
	uses for listening for clients.  The port number only needs to
	be changed if the default port number clashes with another
	application running on your machine or if you want to run more
	than one server on one machine.

    TelnetPort
	Type: integer
	Default value: 4840
	Description: If this option is set to a value other than -1 then
	the server will listen for telnet connections on that port number.
	Players who connect to the game using telnet cannot enter games
	(they can only use the text interface).  When connecting using
	telnet you must have a telnet program that can use linemode
	(most UNIX versions of telnet will work, anything else probably
	won't).

    Teams
	Type: boolean
	Default value: False
	Description: If this option is set to True then team games will
	be enabled.  Normally each player in the game is a different
	colour but during team games all players in a team have the
	same colour.  Players cannot shoot other players in the same
	team.  This option can be changed during the game by typing
	"teams on" or "teams off".

    NumberTeams
	Type: integer
	Default value: 2
	Description: Specifies the number of teams to be used when team 
	games are enabled.  This option can be changed during the game by
	typing "teams <num>".

    MaxLogins
	Type: integer
	Default value: 20
	Description: This option can be used to limit the number of
	people logged onto the server (up to a maximum of 50).

    MaxPlayers
	Type: integer
	Default value: 10
	Description: This option can be used to limit the number of players
	in a game (up to a maximum of 10).

    MinPlayers
	Type: integer
	Default value: 4
	Description: If less than this number of players are in a game
	then robot players will enter the game until there are at least
	this number of players.

    MaxRobots
	Type: integer
	Default value: 4
	Description: This option can be used to limit the number of robots
	in the game (up to a maximum of 6).

    InitialRobots
	Type: integer
	Default value: 1
	Description: The number of robots to be forked off when the
	server starts up.

    InitialRobotsSkillLevel
	Type: integer
	Default value: 6
	Description: Gives the skill level for the robots initially
	created by the server.  The skill level can be between 1 and 10
	(10 is very skillful and 1 is hopeless).

    AllowCreateNewPlayers
	Type: boolean
	Default value: True
	Description: If this option is set to False then new players
	cannot be created automatically (i.e. only players listed in
	the "savefile" can log in).

    AllowHosts
	Type: string
	Default value: *
	Description: Lists the hosts which are allowed to connect to the
	server, using '*' as wildcard.  E.g. to only allow players to log
	in from subnet 193.195.13: "AllowHosts=193.195.13.*".

    DisallowHosts
	Type: string
	Default value:
	Description: Lists the hosts which are not allowed to connect to
	the server.  The format is the same as for AllowHosts.  Only
	players connecting from hosts which match AllowHosts and do not
	match DisallowHosts are allowed to connect.

    TimeToStart
	Type: integer
	Default value: 30
	Description: The time (in seconds) between the second person
	entering a game and the game starting.  Until the game starts,
	players cannot shoot each other.

    AllowPlayersToStartRobots
	Type: boolean
	Default value: True
	Description: If this option is set to True then players
	can start their own robots (using "combat -R"), otherwise
	robots can only be forked off from the server.

EXAMPLES
    To start a server on port 6969 as a background process and redirect
    all error messages to "errorlog":

    combats -bg portnumber=6969 >& errorlog

FILES
    hosts	list of servers which are running
    worlds/	world directories
    CONNECT	message sent to clients when they connect to the server
    LOGIN	message sent to clients when they have logged in
    helpdir/	help files displayed when player types "help <file>"
    savefile	saved scores and passwords for players

NOTES
    More than one server can be started, either on one machine (using
    different ports), or on different machines.  All of the servers can 
    use the same savefile and hosts file.  If you are starting two or
    more servers on the one machine then you must specify different
    values for "PortNumber" and "TelnetPort" for each one (the
    TelnetPort option can just be set to -1 for both servers).

    If the server gives an error message "Cannot create lockfile",
    check to see if there are any files "*.lck", and if there are
    no other servers running then delete these lock files.  These files
    are created while the server is updating the savefile or the
    hosts file and are normally deleted once the server has finished
    updating the file, but they will not be removed if the server
    exits before the update is complete.
