Supybot and Pisg
My server, which I call Yuzu, is a basic LAMP install with Debian and backports enabled. It hosts the website you are viewing right now, and also runs mprime. Today I setup an IRC bot called Trix using Supybot and Pisg to generate channel stisitics. Here’s a quick rundown of what I did, but you can see the final result here.
First I had to install Supybot and Pisg, then generate Supybot’s configuration files using the supplied supybot-wizard (which is way better then EggDrop’s one billion lined config file). Once that was completed, I ran Supybot with disown so it wouldn’t quit when I closed my SSH session.
$ supybot-wizard
$ sudo apt-get install supybot pisg
$ supybot Trix.conf & disown %
I logged into the irc network and messaged the fallowing commands to my bot; Starting with identifying myself as the owner using the password I supplied in supybot-wizard:
identify Krhis [password]
Load the Services plugin so the bot will tell Nickserv its password, then tell the bot who Nickserv is, and finally the bots password that it will give to Nickserv:
load Services
config supybot.plugins.Services.NickServ NickServ
password Trix [password]
Load the ChannelLogger plugin so Pisg can generate statistics. Normally Supybot will only flush logs once an hour to reduce hard drive usage but Pisg will be running twice as often so I want it to have up-to-the-second logs it can retrieve data from. It seems that the version of Pisg that comes with apt is a little outdated and dosn’t like Supybot’s newer time stamp, I should have manually updated Pisg but because I’m lazy so I just reset the bots time stamp format:
load ChannelLogger
config supybot.plugins.ChannelLogger.flushImmediately True
config supybot.log.timestampFormat “[%d-%b-%Y %H:%M:%S]“
Load other less important plugins like ChannelStats, Dict, Seen, and Unix. I had to do a little configuring to the Unix plugin so it knew where to find fortune. Everyone enjoys a random fortune, right?
load ChannelStats
load Dict
load Seen
load Unix
config supybot.plugins.Unix.fortune.command fortune
Getting Pisg up and running was very simple after hacking away at the configuration file, then I just had to copy the images form /usr/share/pisg/gfx/ into the site directory. Pisg now updates every hour, on the hour by adding this to my servers crontab:
0 * * * * pisg –configfile=/home/chris/pisg.cfg –network=irc.irctoo.net –silent