                             QTeam 2.5 beta 1
                           by Quake Innovations

                        Server Side Documentation

Email        : Gary Griggs, qteam@stomped.com
Website      : http://qteam.stomped.com

Table of Contents

   I.    Overview 
   II.   Server options
   III.  Remote Administration of a QTeam server
   IV.   Requirements of clients

I. Overview

   This document describes how to setup as a QTeam server. It assumes that
   the reader is somewhat familiar with running Quake, setting command line
   options, and the differences between client side and server side.
   If you wish to setup as a client, please refer to client.txt for
   additional details. If you aren't yet familiar with Quake, please 
   review the documentation that came with Quake first.

II. Server Options

   QTeam allows the server owner and operators to change may aspects 
   of its operation, both through the command line interface and through
   the remote administration interface. 

   A) Default game mode and map rotation

      This is the most complex of all the options to set for a few reasons
      including that two options have been combined secondly not all games
      work across all maps. 

      The default game mode here refers to what game mode to play when a 
      non QTeam map is loaded (ie. a map that hasn't been specifically
      designed for QTeam). QTeam maps always have the game information 
      embedded within them, and they cannot be changed, so loading a QTeam
      map will be played in the mode it was designed for. Next time a non 
      QTeam map is loaded, the game will be played in the default mode.

      The map rotation describes what happens when a match is over. The
      definition of matches is described in CLIENT.TXT but to summarize,
      there are certain events that cause a game to end such as timelimit,
      fraglimit, less than two teams in a game. 

      Whenever you select an option here that uses map rotations, you must
      set the initial map to be one of the maps in the rotation.

      0 = No default game mode, no map rotation. A QTeam map must be loaded
          to play.
      1 = No default game mode, Rotate through all QTeam maps.
          This will allow a server to step though all the different QTeam
          games. 
      2 = Default game mode is Paintball, no map rotation.
      3 = Default game mode is QFragFest, no map rotation.
      5 = No default game mode, rotate through CTF custom maps (qmelee03,
          qmelee05, qflag, qmelee09)
      6 = No default game mode, rotate through CTF custom maps (qflag,
          qmelee03)
      8 = Default game mode is Paintball, Rotate through DM1-DM6, qmelee08,
          and hippos.
      9 = Default game mode is Paintball, Rotate through DM1-DM6
      11 = Default game mode is QFragFest, Rotate through DM1-DM6

      The value calculated here is passed on the command line using the
      teamplay variable. Multiply the value by 4 and add it to the current
      value for teamplay needed to enabled or disable the other options.

      eg. teamplay 1032 disables the automatic team join feature and enables
          a default game mode of paintball but never changes from the initial
          map.

   B) Friendly Fire
   
      In all game modes, friendly fire controls whether a user can harm his
      teammates. When friendly fire is disabled, a user can harm himself and
      members of the other teams but not his teammates (although currently
      armor of teammates will decrease). The default is enabled which means
      a player will hurt whoever he hits, regardless of team.

      If you want to disable friendly fire, add 512 to the teamplay value
      calculated for all other options.

   C) Automatic revival of players in paintball mode

      In a Paintball game, when a player is eliminated, he will be setup
      to respawn 60 seconds later, unless of course the round ends. This
      is only the default option and can be turned off by adding 2048 to
      the teamplay value calculated for the other options.

   D) CTF Drop in Place 

      In Capture the Flag games, the default behavior is that when a player
      who is carrying the flag dies, the flag is automatically returned to
      its original location it appears when the map first loads. This option
      can be changed so that the flag will drop where the player dies and 
      if the flag is not picked up within 30 seconds of being dropped, it
      then returns to the original location.

      If you wish to change from the default behavior, add 4096 to the
      teamplay value calculated for all other options.

   E) Team Auto-Join

      The default behavior is to automatically add clients just connecting
      to the team with the least number of players. This happens a few
      seconds after they connect so they have time to use the observer 
      command and remain an observer during a match. 
  
      This option can be turned off by adding 1024 to the teamplay value
      calculated for the other options.

   F) Maximum number of teams

      The maximum number of teams that can be created can be controlled
      by using the temp1 variable. Add the maximum number of teams (2-8)
      to the value already calculated of temp1 for all other options.

   G) Remote Administration: Level 1 password (op)

      Set bits 8-31 of deathmatch to the decimal value of the password

   H) Remote Administration: Level 2 password (master)

      Set bits 8-31 of temp1 to the decimal value of the password
      
III. Remote Administration:

   People in the game are either ops or peons.  Typing NAMES in
   the game, will display who is an op, and who isn't.  Ops have an
   @ beside their name, and master ops have two '@'s.

   ]NAMES
   1-@@Paragon (T:2 F:54)  2-PsLAM (T:1 F:34)
   3-Alek (T:1 F:12)

   The T: is the team that the person belongs to, which is the color of
   the player's pants.
   F: is the frags.

   In all these commands, you can either enter the name, or the number.

   To gain ops in a game, you must use the OP command :

   1) type OP
   2) press the ` key (top left) to remove the console
   3) enter the code using the number keys 1-8 (see below for code)

   There are two codes that you can enter, the master code, and the
   normal op code.  The master code should not be disclosed to anyone.

   QTeam supports two levels, so that level 1 ops cannot actually
   crash the server regardless of what they do.  This means that remote
   users could be made level 1 ops without fear that they will end up
   crashing the server. 

   It is quite easy for master ops to crash the server.

   Ops get new commands. The number of new commands depends on what
   level of ops you are:

   Normal               Master
   -----------------------------------
   KCK                  All of Normal commands
   GIB                  SHUTDOWN
   OP                   COMMAND
   DEOP                 CHPASSWD
   NEWMAP               CHMPASSWD
   CHCVAR
   DROPFLAG
   REVIVE
   FFIRE
   AUTOJOIN

   Normal op commands
   ==================

   KCK/GIB/OP/DEOP
   ---------------

   To use the first four commands, type the command on its own, it will
   then list all the people in the game.  Type a user's name and the
   command will act on that user.

   e.g.

   ]GIB
   1-@@Paragon (T:2 F:54)  2-PsLAM (T:1 F:34)
   3-Alek (T:1 F:12)
   Please type name or number to Gib or cancel
   ]Alek
   Alek gets bored with life.

   NEWMAP
   ------

   Newmap allows an op to change the current level. It is entirely menu
   operated, and designed so that ops with level 1 cannot accidently
   enter in a level that the server doesnt have, and therefore crash it
   If you are a Master Op, then you get an addional menu option, where
   you can enter in a level name manually. But be careful that the level
   does exist in the /maps directory!

   Ops with level 2 can also enter in commands manually using the
   COMMAND command. Enter COMMAND on the console, then enter NAME
   "<command you want>" then enter EXECUTE.

   CHCVAR
   ------

   ChCvar allows normal ops to change a Cvar such as TEAMPLAY or
   DEATHMATCH.  This is also menu operated.

   DROPFLAG
   --------

   DROPFLAG allows toggling of the flag dropping during a CTF game. If 
   flag dropping is off, flags always respawn in their original location
   when a flag carrier dies. If flag dropping is on, the flags are dropped
   where a player dies and can be picked up by other players there. If the
   dropped flag remains untouched for a period of 60 seconds, it will 
   be returned to its original location.

   REVIVE
   ------

   REVIVE allows toggling of the automatic revival of eliminated players
   during a paintball round, 60 seconds after their death. This option 
   defaults to on and can be changed at the command line.
   option is on.

   FFIRE
   -----

   FFIRE allows toggling of the friendly fire option. This option
   determines whether you can affect your teammate's health. It does 
   not affect your ability to harm yourself.
   
    
   AUTOJOIN
   --------

   AUTOJOIN allows toggling of team auto-join which 
   
   Master op Commands
   ==================

   SHUTDOWN
   --------

   Shutdown shuts the server down. You get no warning, so use with
   care.

   COMMAND
   -------

   This very powerful command allows you to type any command you like
   on the server console.

   e.g.

   ]command
   Please enter name "<command>";execute
   ]name "sv_gravity 100";execute
   Paragon renamed to sv_gravity 100
   sv_gravity 100 renamed to Paragon
   "sv_gravity" changed to "100"
   ]

   it will automatically change your name back to your old name after
   the command completes.  Due to an inbuilt Quake limit, the maximum
   number of characters in the command is 15. This means that
   the CHANGELEVEL command will not work with level names longer than
   3 characters. For this reason, master ops also get an additional
   menu option on the NEWMAP command:

   ]NEWMAP
   0 - Start
   .
   .
   7 - Cancel
   8 - Enter Map manually.

   Selecting option 8 will give you a similar prompt to the 'command'
   command.

   -------------------------------------------------------------------
   DO NOT USE THE 'MAP' COMMAND. If you do, it will disconnect all the
   players, wipe out who is an OP or not, reset the password back
   to the defaults. Use NEWMAP instead.
   Also, do not type CHANGELEVEL on the server console if there are
   no clients connected. That will also reset passwords to the defaults.
   -------------------------------------------------------------------

   CHPASSWD and CHMPASSWD
   ----------------------

   The default passwords are : 004132 for the normal ops
                               006145 for master ops.

   It is recommended that if you are running a server on the internet,
   that you change the default passwords to something else.

   You can change the passwords for ops and master ops either at the command
   line or by using the CHPASSWD and CHMPASSWD commands, however changing
   via CHPASSWD and CHPASSWD will only take effect for the current
   execution of Quake; if you quit the server and restart the default
   passwords will again be in effect. If you want to make permanent 
   changes, use the command line.

   To change the passwords at the command line, please see the section
   entitled Server Options.

   To change the password in the game, type CHPASSWD, and then enter
   each digit one at a time with a carriage return in between each.
   A password consists of 6 numbers from 0-9.

   CHMPASSWD will change the master password.



IV. Requirements of clients

    If you are running any of the custom maps, the clients connecting to 
    your machine must have the QTeam 2.0 package. If you are running
    Paintball or QFragFest on a non QTeam specific map then all clients
    can connect, even if they don't have QTeam installed on their local
    system. 
