Rivertam

Christoffer Öjeling

1 About

Rivertam is an IRC Bot written in Haskell.
LICENSE: AGPLv3 - GNU Affero General Public License v3

1.1 Features

2 Getting rivertam

The preferred way to acquire rivertam is with git
git clone git://git.mercenariesguild.net/rivertam.git
You can also get a source tarball with the latest version at
http://git.mercenariesguild.net/?p=rivertam.git;a=snapshot;sf=tgz
The git repository can also be browsed at http://git.mercenariesguild.net/?p=rivertam.git
You will also need PostgreSQL, if you use linux I’m sure it’s in your repository, otherwise: http://www.postgresql.org

3 Building

3.1 Requirements

3.2 Compiling & Installing

Compiling and installing is really easy! Cabal will download and install all dependencies.
cabal update
cd rivertam
cabal install 
If you wish to install it globally run it with root privileges.

4 Basic configuration

First you’ll need PostgreSQL with a database rivertam got full permissions to. Since there’s so many different ways to do this, this guide wont even try to explain it. However, it’s very straightforward and it took me about 3min of googling to get it running.

4.1 river.conf

You can either
The example river.conf is well documented.

4.2 Tremded Parser

IRC → Tremulous
Syntax: !trem <message> 
Example: !trem Hello! I love River-Tam!!! 
Tremulous Output: [IRC] Nickname: Hello! I love River-Tam!!!
Tremulous → IRC
Syntax: (In-Game) irc: <message> 
Example: irc: Hello! I love River-Tam too, but leave me alone! I’m playing! 
IRC Output: <[T] Nickname> Hello! I love River-Tam too, but leave me alone! I’m playing!
NOTE: You must set up a fifo before using trem irc!
Decide some arbitrary path for the fifo, here I’m going to use /tmp/fifo. You need to enter the path to the fifo in river.conf also.
mkfifo /tmp/fifo
NOTE: You must have both read AND write permission to the pipe.
When you later start your tremded you need to pipe it’s output to the fifo, specifically stderr. In this example we pipe both stdout and stderr:
tremded.x86 &> /tmp/fifo
Keep in mind that if you quit rivertam and the server writes something to the fifo it will crash. There’s an easy workaround, keep the fifo open in an external program without writing anything to it. Here’s a program like that written in C:
//Usage: ./program /path/to/fifo
#include <stdio.h> 
int main(int argc, char ** argv) 
{
}

5 Credits

Programmer
Thanks to