Skip to content
Leelabot
Urban Terror · PHP · GPL-2.0+

Run your Urban Terror servers from the chat box.

Leelabot sits between the two teams and your RCon. It answers admin commands typed in game, hands out warns and bans on its own, and keeps the stats.

19:04 Zaki: !stats

19:04 Leelabot: Zaki — 24 kills, 9 deaths, ratio 2.66

19:06 Rook: !nextmap

19:06 Leelabot: Next map is ut4_turnpike

19:11 Leelabot: Kilo warned (2/3) — teamkill

19:12 Duke: !cyclemap

Blue 69
  • 24:9 Zaki
  • 19:12 Duke
  • 15:14 Ash
  • 11:13 Nyx
Red 62
  • 21:11 Rook
  • 18:10 Vex
  • 14:16 Kilo
  • 9:15 Sable

What it does

It never talks to the game directly. It follows the log files each server writes, hands what it finds to the plugins you loaded, and answers on whichever channel makes sense.

Reads

  • games.log server 1
  • games.log server 2
  • games.log server 3

Dispatches

  • adminbase
  • basicrights
  • stats
Leelabot
  • bans
  • warns
  • logs

Answers

  • RCon back into the game
  • IRC your channel
  • TeamSpeak who's in voice

Commands, typed in game

Rights are per command and per admin level, so trusted regulars can call a vote without ever getting near your RCon password. Hover one to see what it does.

Plugins in the box

Load only what a server needs. Each one is a single PHP file you can read, fork, or use as the template for your own.

adminbase
Most of the admin commands: kicks, maps, votes, server control.
assault
Helpers for the Assault gametype.
bans
Ban players and keep the ban list on disk.
basicrights
Simple rights management, built for ease of configuration.
clientbase
Player-facing commands: !teams, !time, !nextmap, !help.
dummy
A skeleton to copy when you start your own plugin.
irc
A full IRC bot bridging server chat to a channel.
logs
Logs all activity on each server separately.
messages
Recurring announcements posted in chat on a timer.
stats
Game statistics for every player, plus end-of-round awards.
teamspeak
Reports who is currently on the TeamSpeak server.
warns
Auto-warns teamkilling and insults, kicks repeat offenders.

Get it running

Clone it, point the config at your server's RCon, and start the bot. It runs as a long-lived CLI process — screen, tmux or a systemd unit all work.

PHP
5.3.0 or newer
PHP-CLI
the bot runs from the terminal
intl
optional, for translations

$ git clone https://github.com/ylorant/Leelabot.git

$ cd Leelabot

# edit the config, then:

$ php bot.php