Skip to content

DDOS-code/rivertam

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

(1.0) ->  About the bot
(2.0) ->  Getting rivertam
(2.5) ->  Basic Configuring
(3.0) ->  Tremded Parser
(4.0) ->  Credits


(1.0) About the bot
================================================================================
Rivertam is an IRC Bot written in Haskell.
LICENSE: AGPLv3 - GNU Affero General Public License v3 (see LICENSE)

Features:
 * Access System (Levels: Master, User, Peon, Mute)
 * Tremded Parser (Send a message to IRC from the server and vice versa)
 * Flame/Love - What can be more humiliating than having an irc bot insult you?
 * Tremulous Master Polling - Find tremulous players, list online clan-players,
     get current scores from a server, get statistics based on cvars.
     All within 1.5s!
 * Clanwars Tracker - Saves clangames to a database, Generates a variety of
    statistics. Clangames are easily added with a brief command in irc.
 * Clanlist - Keep track of clans. Integrates with clanwars and tremulous commands.
 * Memos - Send a message to someone when any sign of life is seen.


(2.0) Getting rivertam
================================================================================
If you want to compile your own binary directly from the source, consult BUILD and skip to (2.5).
If you don't know what that means or you're more comfortable getting a precompiled binary,
Get one of the following files:
 * Linux 32bit    - <insert link>
 * Linux 64bit    - <insert link>
 * Windows 32bit  - <insert link>

You will also need PostgreSQL, if you use linux I'm sure it's in your repository, otherwise:
http://www.postgresql.org/

Extract the files and head over to configuring.


(2.5) Basic Configuring
================================================================================
First you 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.

Configuring rivertam:
You now have one of two options:
1) Create .rivertam/ in your home directory and copy river.conf and IpToCountry.csv there.
2) Make sure rivertam is started from the directory with the above files in it.
   (NOTE: for this to work .rivertam/ can't exist)

Modify river.conf to your needs and you're ready to go!
pgconn example for a user called testuser and a database called rivertam:
pgconn         "dbname=rivertam user=testuser"


(3.0) Tremded Parser
================================================================================
Send message from IRC to In-Game:
 Syntax:
  (Specified IRC Channel)
  !trem <message>
 Example:
  !trem Hello! I love River-Tam!!!
 Output:
  [IRC] Nickname: Hello! I love River-Tam!!!

Send message from In-Game to IRC:
 Syntax:
  (In-Game)
  irc: <message>
 Example:
  irc: Hello! I love River-Tam too, but leave me alone! I'm playing!
 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 however:

 $ tremded.x86 &> /tmp/fifo

NOTE: If for some reason you quit river-tam and the server writes something to the fifo the server 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)
{
	FILE * fx = NULL;
	int null;
	if(argc > 1) {
		fx = fopen(argv[1], "r");
	} else {
		printf("Missing Argument\n");
	}
	scanf("%d", &null);
	if(fx) fclose(fx);
	return 0;
}


(4.0) Credits
================================================================================
Programmer:
 Christoffer Öjeling "Cadynum"  - <[email protected]>

Thanks to:
 Twey            - Haskell support
 Raf             - Helping me learn Haskell
 OddRaw          - Bughunting
 MG & benmachine - git repository
 Entroacceptor   - Bughunting, bot hosting, SQL support

Have fun, and for the love of science do NOT abuse pingall! :)

About

Irc-bot for tremulous

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published