
Version: 1.3
Written by: GaB|Mindcrime (in real life Remy Wetzels <mindcrime@chello.nl>)
Copyright: 2002-2004 by Remy Wetzels


Mindcrime's Wolfbot: an IRC Live Reporter Bot.
==============================================

IRC Commands:
-------------

All these commands can be send via a private message to the bot.
In irc you do this by:

/msg NickName MessageText

So if the bot was named RTCWLiveBot and you want to become botowner
and the botpass was 'YEP' you would do something like:

/msg RTCWLiveBot !pass YEP

BOT Commands:
-------------

IMPORTANT:
The bot will only answer if it has received a successfull
command. Any failure of a command will not be reported!

It might take some seconds BEFORE the bot actually responds,
so be patient!

All bot commands start with an exclamation mark (!) and
consist of a single word fixed to that exclamation mark.
Some commands may have additional arguments.

All arguments MUST be sent unless they are placed
between brackets ([ and ]).


- !pass password
- !password password

This let's you become the botowner for as long as no one
else uses this command. Before you can do anything with
the bot via IRC you need to use this first!
The previous owner will be notified that he is no longer
the current botowner.


- !quit

This stops the program.


- !help

This shows you the list of available commands. This will
only work if you have successfully become the botowner.


- !view simple|normal

This determines the way how the frags are shown, currently there are
two types of view mode:

simple = XXXX killed YYYY - mp40
normal = YYYY was killed by YYYY's mp40 in the head


- !rcon COMMAND

The bot will send COMMAND to the server via RCON.


- !rconpass PASSWORD
- !rconpassword PASSWORD

The bot will set the RCON password (to be used in !rcon) to PASSWORD.


- !say TEXT

The bot will display the text (after a possible !delay) in the IRC channel.


- !saynow TEXT

The bot will display the text (without any delay) in the IRC channel.


- !delay [XX:YY]

this is about the same principle as WolfTV's tv_delay config setting.
it will delay any game output at least this long (so that any shoutcast.
or wolftv broadcasts can be synchronized).


- !nick nickname

Change the irc nickname of the bot.


- !newpass oldpassword newpassword newpassword
- !newpassword oldpassword newpassword newpassword

Change the irc botowner password from oldpassword to
newpassword. You have to type the newpassword two times
to prevent accidental mistakes.


- !channel #channel [channelpass]

Change the irc channel to #channel (and which is protected
by channel key/password channelpass). The bot will leave
the current channel with an exit message that it is joining
the other channel.


- !settings

This shows you the current settings of the bot.


- !logdir [directory]

with some games (specifically RTCW/SOF2) you often have the problem that
the logfile is generated/opened in the game MOD(ification) directory which
you are playing on that particular server. For example osp/rtcwconsole.log,
osp/qconsole.log, wtv/rtcwconsole.log, main/qconsole.log, etc. The logfile
allways has the same name only the directory changes. You now do not need
to fully restart the bot anymore. If you had the bot pointing to
c:\games\rtcw\main\rtcwconsole.log you can now use for example "!logdir osp",
that will tell the bot to try and find the logfile in
c:\games\rtcw\osp\rtcwconsole.log. Notice that you it only changes the
LAST directory name, besides that you can ONLY enter a directory name
which only exists of alpha-numerical characters (a-z, A-Z, 0-9) or the
minus '-' or the underscore '_' sign.
(client mode ONLY)


- !floodprotect [on/off/skip]

This turns irc floodprotection to on/off. It will try to
prevent excess flood kicks. If you choose skip it will also
skip lines if the bot notices that it has to wait for more
than three lines to prevent excess kicks. Use this last one
only if the bot starts to really lag behind live gameplay.


- !byterate [#rate]

This sets the maximum irc byterate for floodprotection.


- !floodperc [1-99]
- !floodpercentage [1-99]

This set the bot's flood percentage. Flood protection
will prevent the bot from being kicked by IRC for possible
flood excesses. See the command floodprotect for more information.
If you have set floodprotect to "skip" this floodpercentage will
determine the percentage of (frag)lines being skipped from the
output. When there is a lot of action going on the bot will start
to run behind the gameplay and might also getting kicked for
sending to much info. Using floodprotect (and set to on) might
prevent you getting the bot kicked (for excess flood), but it
also might get the bot to run behind the actual live gameplay. If
you set floodprotect to skip the bot will start to throw away
less important info (frags are less important than dynamite
plants and objectives reached) and will do this with a random
chance of this floodpercentage value. Default is 33%. Which means
that it throws away every 1 in 3 lines on average. This seems a lot
but remember that the bot normally does not throw away any
(frag)lines unless the bot continuously reaches the byterate
limit and is seriously getting behind live gameplay or that it
has serious network connection problem (because your connection
is unstable).


- !loadleague

This reloads the league.cfg file.


- !loadcolors

This reloads the irccolors.cfg file.


- !et [on/off]

Turn on/off support for RTCW: Enemy Territory. This must/should be turned on
when playing RTCW: ET. It has no effect in RTCW (in client mode).


- !score red/blue value

This sets the current game score of the Red/Axis team or
Blue/Allies team to value.


- !roundlimit value

This sets the roundlimit of a game. This will only have effect in
certain gametypes where the round scores will be reset when the
number of rounds played (score of red and blue team) total that limit.


- !fraglimit value

This sets the fraglimit of a game. This will only have effect in
certain gametypes where the player scores will be reset when the
score of one of the players reaches that limit.

Default value is 0 (no fraglimit). Roundlimit and scorelimit takes
precedence over fraglimit.


- !scorelimit value

This sets the scorelimit of a game. This will only have effect in
certain gametypes where the round scores will be reset when the
score of one of the teams reaches that limit.

Default value is 0 (no scorelimit). Roundlimit takes precedence over
scorelimit.


- !roundscore red/blue value

This sets the current round score of the Red/Axis team or
Blue/Allies team to value.


- !showroundscore

The bot will show the current round score on the IRC channel.


- !showscore [TXT]

The bot will show the current game score on the IRC channel.
You can give a text stating the current score.
If no value is give the current set score is shown (if
any)


- !showplay [on/off]

The bot will show frags and gameplay if set to on.
Default is to show the frags and gameplay.


- !showfrags [on/off]

The bot will show frags if set to on.
Default is to show the frags on RTCW and SOF2.
Default is NOT to show the frags on STEF.


- !playerstats [on/off]

The bot will show the kills/deaths of a player with each frag he
makes if turned on.


- !weaponstats [on/off]

The bot will show the weapon statistics of each player. Please
note that this will show a lot of information and therefore will
leave the bot lagging behind in the game so it has to catch up
again.
(RTCW OSP Server only)


- !loadmaps

This reloads the mapinfo.xml file.


- !map [mapname]

The bot will show/set the current map.


- !clantag red/blue name

This sets the red or blue clantag. See !useclantags for more information.


- !useclantags [on/off]

If you want the bot to determine the team of the players by their clantags,
set this to on.


- !silent [on/off]

This shows/sets/unsets the silent mode. If the silent
mode is on the bot won't sent anything to the IRC channel
but it will still continue to scan the logfile.


- !renameteam red/blue name

This renames the red or blue team.


- !swapnames

The bot will swap the names and clantags of the Red and Blue teams.


- !swapplayer [player-id [team-name]]

The bot will swap the team of the the player with id player-id to team-name.
Use !swapplayer without any arguments to get a list of player-id and
team of all players. Use that id to change the players team.
Possible "team-name" are Red, Blue, Axis, Allies and Spectator.


- !swapplayers

The bot will swap the teams of the Red and Blue players.


- !swapscores

The bot will swap the game/round scores of the Red and Blue teams.


- !swapgamescores

The bot will swap the game scores of the Red and Blue teams.


- !swaproundscores

The bot will swap the round scores of the Red and Blue teams.


- !swapteams

The bot will swap the names, clantags, players and game/round scores
of the Red and Blue teams.


- !settime XX[:YY]

The bot will set the time remaining (RTCW/MOHAA) or elapsed (SOF2/STEF) time
on the map to XX minutes and YY seconds. If the maptime is unknown to the bot
use this as time elapsed on the map.
(This setting effects client mode only (MOHAA server too))


- !maptime [XX[:YY]]

The bot will show or set the maptime on the map to XX minutes and YY seconds.
(This setting effects client mode only (MOHAA server too))


- !roundtime [XX[:YY]]

The bot will show or set the roundtime on the map to XX minutes and YY seconds.
(This setting effects client mode only (COD/MOHAA server too))


- !usetime [on/off]

The bot will show the time remaining on the map if this is set to on.
If set to off it will be turned off. If no value is entered it will
show the current status.
(This setting effects client only (MOHAA server too))


- !teammode [on/off]

This shows/sets/unsets the teammode option.


- !messages [on/off]

This shows/sets/unsets the messages option.


- !osp [on/off]

This shows/sets/unsets the OSP mode option.
(This setting effects RTCW/SOF2/Q3 only)


- !pam [on/off]

This shows/sets/unsets the PAM mode option.
(This setting effects COD only)


- !fight [on/off]

This shows/sets/unsets the OSP/ET FIGHT option.
This normally will be set automatically by the bot, but if you connect
to a game already in progress the bot has not yet seen FIGHT! come by.
(This setting effects RTCW/RTCW:ET client only)


- !ospfight [on/off]

This shows/sets/unsets the OSP FIGHT option.
This normally will be set automatically by the bot, but if you connect
to a game already in progress the bot has not yet seen FIGHT! come by.
(This setting effects RTCW client only)


- !ospshow [value]

This shows/sets the OSP server options.
This turns on some server side notices. The extra argument you give
is the sum of the values of each option you would like to turn on.
Default the sum is 3 (1+2), which turns on Objective Destroyed (1)
and Dyna Planted/Defused (2) option. For ET (default 19) the Covert-Ops
Disguised is also shown (16).
Possible options are:
Show Objective Destroyed (default ON):     add 1 to the sum to turn on
Show Dyna Planted/Defused (default ON):    add 2 to the sum to turn on
Show Medic Revives (default OFF):          add 4 to the sum to turn on
Show MG-42 Engineer Repairs (default OFF): add 8 to the sum to turn on
ET only: Covert-Op Disguise (default ON):  add 16 to the sum to turn on
ET only: Server Votes (default OFF):       add 32 to the sum to turn on
(This setting effects RTCW/ET server only)

- !etshow [value]

This turns on some server side options. The extra argument you give
is the sum of the values of each option you would like to turn on.
Default the sum is 3 (1+2), which turns on show classes (1)
and show rank (2) option.

Possible options are:

1. The player's class            : add 1 to the sum
2. The player's rank             : add 2 to the sum
3. The player's skills           : add 4 to the sum
4. The player's number of medals : add 8 to the sum

This ONLY works if PLAYERSTATS was set
to ON (see -c option). PLAYERSTATS normally shows [XX/YY] behind
each players names denoting the kills (XX) and deaths (YY) of the
player at that time. If you enable any of the above it will
also show an extra [ZZZZZ] with the following info:

1. - If you enable show classes, a letter denoting the player's class:
M = medic, F = field ops, E = engineer, S = soldier, C = covert-ops,
? = currently-unknown.

2. - If you enable show rank, a number denoting the player's rank:
rank#		Axis			Allies
0		Oberschutze		Private 1st Class
1		Gefreiter		Corporal
2		Feldwebel		Sergeant
3		Leutnant		Lieutenant
4		Hauptmann		Captain
5		Major			Major
6		Oberst			Colonel
7		Generalmajor		Brigadier General
8		Generalleutnant		Lieutenant General
9		General			General

3. - If you enable show skills, a letter denoting the skill and a number
  denoting the player's level for a certain skill:
The levels ranks from 0-4.
The skills are:
B = battle sense, E = engineering, F = first aid, S = signals,
L =light weapons, H = heavy weapons and I = intelligence
So something like:
S(E3H2) means: skills: engineering level 3, heavy weapons level 2.

4. - If you enable show medals, a letter denoting the skill and a number 
  denoting the number of medals the player got for that skill:
The skills are:
B = battle sense, E = engineering, F = first aid, S = signals,
L =light weapons, H = heavy weapons and I = intelligence
So something like:
M(E3H2) means: skills: engineering 3 medals, heavy weapons 2 medals. 

ATTENTION: Taking it al together would give you something like:

N00B [C1S(I1)][ 0/15] was stabbed by 
Mindcrime [M9S(B4F4S4L4)M(B3F2S1L1)][15/ 0]'s knife.

meaning: N00B is a Covert-Ops of Rank 1 (Gefreiter/Corporal) with
Intelligence on skill level 1 and NO medals who killed 0 times and
was killed 15 times and who just was stabbed by Mindcrime who is a
Medic Rank 9 (General) with Battle-Sense level 4, First Aid level 4,
Signals level 4 and Light Weapons level 4 (rest 0) who earned 3
Battle Sense medals, 2 First Aid medals, 1 Signals medal and 1 Light
Weapons medal who killed 15 times and never (0) died...

Notice that the information part is very long!!!! So default it will 
show something like:

N00B [C1][ 0/15] was stabbed by Mindcrime [M9][15/ 0]' knife.
(This setting effects ET server only)


- !showstatsafter [value]

This shows/sets the SHOWSTATSAFTER options.
This controls when to show the player statistics. The extra argument you give
is the sum of the values of each option you would like to turn on.
'stats after' must be set to a value greater than 0.
For example if the sum is 7 (1+2+4), it turns on round wins (1), timelimit hit (2)
and score/frag limit option.
Possible options are:
Show after round wins (default ON):            add  1 to the sum to turn on
Show after timelimit hit (default ON):         add  2 to the sum to turn on
Show after score/frag limit hit (default ON):  add  4 to the sum to turn on
Show after map shutdown/end (default OFF):     add  8 to the sum to turn on
Show when no data received  (default OFF):     add 16 to the sum to turn on


- !stats

This shows you the current player stats


- !channelstats

This shows the current player stats on the IRC channel


- !showconnectinfo [#value]

This shows/sets the SHOWCONNECTINFO options.
This controls when to show the player connects, disconnect, battle
enter, battle left, team joins, timeouts, inactivity drops, etc.
It is the sum of the values of each option you would like to turn on.
Possible options are:
Show player connect:				add   1 to the sum
Show player disconnect:				add   2 to the sum
Show player entering the battle:		add   4 to the sum
Show player leaving the battle:			add   8 to the sum
Show player timing out:				add  16 to the sum
Show player dropping due to inactivity:		add  32 to the sum
Show player joining a team:			add  64 to the sum
Show player preparing for deployment:		add 128 to the sum
Show player being kicked:			add 256 to the sum
Show server (UDP) query (ping/score/team):	add 512 to the sum
Game default value is 0. So nothing is shown.
(NOTE: Not all options are available in all games and modes).


- !roundscoreclear

This sets the round score of the teams to 0


- !scoreclear

This sets the game score of the teams to 0


- !statsclear

This clears the current player stats


- !statsdelete

This deletes the current player list (and player stats)


- !statsafter [#frags]

Sets/shows the player statistics after this many frags.


- !restart [#lines]

Restarts the bot. This will close the currently open logfile, reset
the stats and scores and the bot will try to open the (possibly newer)
logfile again and it will go to the end of that logfile when no
extra argument is given (or a value of 0) or it will recover (see
recover option in the documentation) from the entered number of lines.


- !close

Close the logfile. This will close the currently open logfile and
it will stay closed untill you issue a !restart command again.

This feature was added to circumvent file locking by the bot, so that
the user can delete the logfile if necessary.


- !server [serveraddress serverport]

This shows/changes the current server to which the bot will ask
for information about scores and pings.


- !linesread

This shows the number of lines read from the logfile.


- !codversion [0/1/2]

This shows/sets the version of CALL OF DUTY.

Values:

0: original version.
1: patch 1.20.
2: patch 1.30.
(This setting effects COD only)


- !langin [en/de/nl]

This shows/sets the language of the logfile.
Current values: en = English, de = German.
MOHAA only: nl = Dutch.


- !langout [en/de/nl]

This shows/sets the language you wish to sent to the IRC channel.
Current values: en = English, de = German, nl = Dutch.


- !operator

If the bot has operator privileges he will give operator privileges
to the bot owner.

