frubot

About

frubot is a gateway between IRC and Urban Terror server. You can see it running on #polkowice @ QuakeNET. By using frubot you can see on your channel what is being written on UrT server (both "say" and "teamsay" messages) and vice versa! It has also implemented additional features like kicking, slapping, detecting cheaters via well known kemfew GUID or 1337 port and many more. It is using Big Brother Bot database to check players' aliases.

In order to run frubot following requirements should be met:

Installation

Download frubot tar.gz package listed below and unpack it:

$ tar zxf frubot-100413.tar.gz

Edit configuration file config.fru to fit your needs:

ircServer=irc.quakenet.org
ircChannel=#polkowice
ircNick=PolkoLIVE
serverName=[PL] CTF POLKOWICE
serverAddr=127.0.0.1
serverPort=27960
rconPassword=your_rcon_password
adminPassword=your_admin_password
modPassword=your_mod_password
dbHost=127.0.0.1
dbUser=database_user
dbPass=database_password
dbName=database_name
logName=/home/matti/.q3a/q3ut4/games.log

Start frubot manually:

$ python ./frubot config.fru

...or using simple script provided within package (screen required):

$ ./START_IRCBOT.sh

User's guide

If installation and running phase went fine, you should be able to see bot joining your channel specified in configuration. frubot registers players when they're connecting to UrT server, so we need some time (until map reload) to synchronize data between bot and UrT. Messages from UrT server are sent using following format:

<x:nick> or <x:team:nick>

which means "say" and "teamsay" respectively. x is a unique client ID which is used to execute commands. These commands are:

!list - lists players present on UrT server
!info x - shows extended information (player name, IP address, GUID) about player x (client ID)
!kick x - kicks player
!slap x - slaps player
!mute x - mutes player
!nuke x - nukes player
!ban x - bans player
!shuffle - shuffles teams
!force x <cvar> <value> - forces client var (cvar); it works only with modified ioUrT binary, which can be found here; example: !force 4 name Forced_name will force player 4 to use nickname Forced_name
!search string - looks for string in nicknames' database; returns CID (client ID in database - different from actual client ID!) which is useful for managing offline users
!extinfo CID - shows extended information about CID
!banguid [x | #CID] - bans guid and current IP; automatically re-bans when IP is changed !bigtext message - sends "bigtext" message to server
!! message - sends message to server as "console"
!aliases [x | #CID] - shows player's aliases [current client ID | database ID]

Some of the commands need admin privileges which can be gained by private messaging bot and typing admin password specified in configuration. You can resing from being admin by typing logout. Note that due to unreliable nature of UDP which is base for RCON some commands can be dropped while transporting.

Problems

I assume you are familiar with Linux. The most difficult thing to do is to install additional python libraries (especially MySQLdb) if you don't have root access. You can install them somewhere into your home directory eg. /home/me/pylibs, then you have to set enviroment variable PYTHONPATH=/home/me/pylibs/lib/python2.3/site-packages (I recommend you to export this variable in .bash_profile) in order to set python search path automatically after every log in.

A good idea is to set sv_floodprotect to 1 which will prevent bot quitting due to Excess flood frequently.

Known bugs

Download

frubot-101223.tar.gz

Credits

frubot is based on example program delivered with irclib.py written by Joel Rosdahl <joel(at)rosdahl.net>. Classes events.py, rcon.py and parser.py are borrowed from Kiwi Bot written by Mathieu "MathX" Xhonneux. Thanks! You can freely distribute and modify frubot.

http://kiwi.tuxfamily.org/
http://python-irclib.sourceforge.net/
http://www.bigbrotherbot.com/forums/

PS. This is a completely private project I am developing in my free time. It surely has many bugs and unimplemented important features (like reconnect). Don't blame me the code is ugly and non-optimal - I'm neither a python programmer or professional programmer :) Feel free to ask me if you need help: fruk@QuakeNET