###################################################################################
#
# PowerAdmin
# Plugin for B3 (www.bigbrotherbot.com)
# (c) 2006 www.xlr8or.com (mailto:xlr8or@xlr8or.com)
#
# This program is free software and licensed under the terms of
# the GNU General Public License (GPL), version 2.
#
# http://www.gnu.org/copyleft/gpl.html
###################################################################################

PowerAdmin (v1.3.0) for B3
###################################################################################

This plugin works for CoD2 only! This plugin adds powerfull commands to your b3:

wihout any serverside tools:
!pamapresart - Restart current map
!paset <cvar> - Set a server cvar
!paget <cvar> - Read a cvar from the server
!paexec <configfile.cfg> - Execute a server configfile

With Ravir or bullet Worm's powerserver and no poweradmin CoD2 mod:
All previous commands plus:
!paswitch <name> [<reason>]- switch a player to the other team
!paswitchall - switch all players
!paforcespec <name> [<reason>]- switch a player to spectator
!pakillplayer <name> [<reason>]- kill a player

With aditional poweradmin CoD2 mod (included in package):
All previous commands plus:
!paforceallspec - force all players to spectator
!paforce - Force a player to allies, axis or spectator (slightly diff from switch)
!palosepoint - Make a player lose a scorepoint
!pacompensate - Compensate a player, add 1 scorepoint, reduce deaths by 1
!pascore - Alter a players score, add or deduct an amount of points
!padeaths - Alter a players deaths, add or deduct an amount
!pasaybold <message> - Print a Bold message on the center of all screens.
!paendmap - end the map gracefully with scorescreen
!parename <player> <newname> - Force a clients Name
!paexplode <player> [<reason>] - Blow the player up.
!paburn <player> [<reason>] - Set a player on fire and kill him.
!pashock <player> [<duration>] - Shock a player (shellshock).
Finally there are 2 by default disabled commands, these commands are very powerfull
and need manual leveling in the plugin configfile
!paenforce - Enforce any dvar clientside!
!paretaliate - Make it impossible for a player to play untill he performs a manual
                disconnect and game-restart!

Each command can be leveled in the config file.


Requirements:
###################################################################################

- Call of Duty 2 server
- B3 version 1.1.0 or higher


Installation of the B3 plugin:
###################################################################################

To install the b3-plugin part:

1. Unzip the contents of this package. Go to the unzipped folder extplugins and
place the .py file in the bots folder b3/extplugins and the config file .xml in
the b3/extplugins/conf folder.

2. Open the .xml file with your favorit editor and modify the
levels if you want them different. Do not edit the command-names
for they will not function under a different name.

3. Open your B3.xml file (in b3/conf) and add the next line in the
<plugins> section of the file:

<plugin name="poweradmin" priority="13" config="@b3/extplugins/conf/poweradmin.xml"/>

The numer 13 in this just an example. Make sure it fits your
plugin list.


Installation of the CoD2 mod:
###################################################################################

To install the CoD2 mod there are several possibilities depending on the state of
your CoD2 server. The standalone poweradmin mod for CoD2 INTERFERES with other mods
like bulletworm's powerserver mod or AWE.

First check out b3.cfg. It's an example config telling you which cvars to use in your
server configfile. Or you may ofcourse add a line in your server config like:
exec b3.cfg (before map_rotate!)

So if your CoD2 server is stock version 1.3 you can just put the
zzzz_b3_svr_pwradm-stndlone-v#.#.#.iwd file inside your CoD2/main folder (or unzip it
in your fs_game folder) and restart the server.
DONE...

If you use AWE here's what to do:
1. Go to your CoD2/awe/ folder (this is your fs_game folder)
2. Unpack b3_parts_awe-v#.#.#.zip with a program like winzip into the fs_game folder
   So a new folder called b3 and its content exist.
3. Open awe/_global.gsc with a text-editor and add the next line
   in the init() part below the list that starts with "// Init Stuff":
     b3\_b3_main::Init();
4. Restart the server for the changes to take effect
DONE...

If you use bullet worm's powerserver or any other mod here's what to do:
1. unpack the serverside part of the mod into an fs_game folder
   in your CoD2 gameserver structure. If you don't know how to set this up
   go here and read this carefully:
   http://www.iwnation.com/Forums/index.ph  opic=16371
2. Unpack b3_parts_generic-v#.#.#.zip with a program like winzip into the fs_game folder
   So a new folder called b3 and its content exist.
3. Open _b3_poweradmin.gsc with a texteditor and read the instructions in the
   StartThreads() and _b3_endmap() functions. All editing points start with !EDIT!
   so you can use a searchfunction to not miss them.
4. Open each gametype script in maps\mp\gametypes\ (eg. ctf.gsc, tdm.gsc etc.)
   and add in main() (just before level.autoassign = ::menuAutoAssign;) the next line:
     thread b3\_b3_main::Init();
5. Restart the server for the changes to take effect
DONE...

Musicfunction: If you wan to use the musicfunction in the mod you have to put a small
clientfile available for download to the clients. b3_music1.3.0.iwd is to be located
in you main folder or preferably in your fs_game folder. The file is only 5kB and
it wont take long to download, neither will it restrict a player from playing if he
doesn't have the file. I personally like it very much, it adds some drama to the game.

NOTE: Including this mod into other mods may cause unexpected behaviour. If your
installed mod already has spawnprotection I couldn't tell what happened if you
activated our spawnprotection aswell. I can and will not support those issues.
Including our mod into an existing mod is your own decision and I strongly advise
against you doing this when you're not familiar with these kinds of actions.

(The mod was tested on a Dedicated CoD2 version 1.3 Linux distro in combination with
AWE 3.0 beta 9.)


Changelog
###################################################################################
v1.0.0         : Initial release
v1.0.0 - v1.0.1: patched player.id to player.cid
v1.0.1 - v1.1.0: Added servermod with new functions and AWE compatibility.
v1.1.0 - v1.2.0: New filestructure, tools and goodies.
v1.2.0 - v1.3.0: A code update and new additions


###################################################################################
xlr8or - 11 aug. 2006 - www.bigbrotherbot.com // www.xlr8or.com