BF2Bot Quick Start Guide
This is a quick guide about the bot and getting it installed and running.
BF2Bot is an IRC bot for showing game events from a BF2 server to an IRC channel. This can be used to show a match or even as an admin tool (along with highlights in your IRC client). BF2 mods should be supported too, although this has not been verified yet.
The BF2Bot is in two parts. One of these is a Python script that needs to be installed on the BF2 server and the other is a Java IRC bot. The bot part can be run anywhere that Java can be run, which covers operating systems such as Windows, Linux, MAC, etc
Note: For the purposes of these instructions, we will assume that the bot files are installed in C:\BF2Bot
The Python script is bf2bot.py (located in C:\BF2Bot\system\BF2Bot\). There are a couple of things that you will want to edit in this file ...
# the IP of the machine to send the data to (the machine running the bot)
DEST_MACHINE = '999.999.999.999'
# the port of of the machine to send the data to
DEST_PORT = 4300
# how many seconds in between each ticket status update
TICKET_STATUS_DELAY = 60
The script needs to be installed into the <BF2_SERVER_DIRECTORY>\mods\bf2\python\game directory, eg:
C:\Program Files\EA GAMES\Battlefield 2 Server\mods\bf2\python\game
You need to edit the __init__.py file to include these lines:
import bf2bot
bf2bot.init()
After this, the server should be restarted.
First thing to do is get a Java runtime installed to the machine that you want to run the bot from. You can download the correct JRE (Java Runtime Environment) from http://www.java.com. Follow the instructions associated with your Java download to get it installed. Note: The JRE is free.
Once the JRE is installed, unarchive the BF2Bot files to your harddrive.
The main bot config file is located at C:\BF2Bot\system\PPF\PPFConfig.xml. This can be edited with any text editor.
- edit the adminPassword, masterPassword, and trustedPassword to suit your own needs
- set the servers list for the network that you want to join
- set the list of nicks that the bot can try to use
- set the channels that you want the bot to join at startup
The BF2Bot reporter config is located at
C:\BF2Bot\system\BF2Bot\BF2BotConfig.xml. There is really only one setting that MUST be checked, and that is the
port attribute of the server element:
<server host="999.999.999.999"
port="4300" password="password"/>
This needs to be changed to the same value as you set in
DEST_PORT in the bf2bot.py python script. The other settings (host and password) don't have any use at this point. (restart the bot if you make changes while it is running)
- after installing the Python script, restart the BF2 server
- start the bot (BF2Bot.bat on Windows, BF2Bot.sh on *NIX's)
- auth with the bot, eg: /msg BotName auth adminPassword
- start the reporting from the channel that you want the reporting in; !startbf2
- enjoy :D
Last Updated Monday, September 12 2005 @ 12:54 AM CDT 