Sunday, April 4, 2010

Why bots are big and how to setup a simple IRC-based supybot ( part 1)

[caption id="attachment_1495" align="alignleft" width="242" caption="Powered by Karmic Koala"][/caption]

As more Ubuntu users get stable broadband connections, running a bot to do simple menial tasks such as responding to queries, fetching information and carrying out maintenance will become increasingly common. There are quite a few off-the-shelf bots available. Most of them have been trained to perform IRC tasks, but there is no reason why they cannot live in the shell or terminal and interface with whatever command-line programmes you might have installed. Obviously doing so raises all sorts of questions, which is why you will want to treat your bot as a user on your system without root privileges.

Here is how to install the R2D2 of bots, Supybot:

1. Add new user

addusr <name of your bot>

2. Switch to new user

sudo -u <user> -i

3. Install supybot

apt-get install supybot

4. Create botdir and run supybot-wizard

supybot-wizard

The above command provides nice non-gui interactive wizard which helps you for basic configuration.

5. Start the bot

run following command your new user (non-root).

#supybot /path/to_file/<supybot.conf>

<supybot.conf> can be named after you bot or user, so check first.

Resources:

My experience setting up an IRC bot

Short introduction to Supybot

How to configure Supybot on Fedora

Supybot Resources

Supybook Latest

No comments:

Post a Comment