Sleek as that.
May 29, 2007, 5:34 pmSome people may know that I was once loosely involved in a personality script for IRC bots called ‘bMotion‘, which makes Eggdrop bots a bit more interesting. Although it’s been some years, I still like to keep them around because I think they’re fun; because of this, I’ve been trying for some time to keep ‘Iono’, in the Psi MUC (psi@conference.psi-im.org). Iono was a sellotape and string effort to have bMotion in the MUC. There was an Eggdrop bot running the bMotion script connected to an IRC server, in the same channel as a bridge bot, written in perl, which tried (and frequently failed) to relay the comments of the bot to the Psi MUC, and provide input in the reverse direction. This never worked very well, and I’ve been looking for a better solution, which has now presented itself. The solution takes the form of the SleekBot, which is an early version of a bot, written by Nathan Fritz, based on his SleekXMPP Python library. Read his recent blog post on the subject for more information, and a nice example of Ad-Hoc command usage.
SleekXMPP already has a very nice plugin-based system, with XEPs each being a seperate plugin (it was easy enough for me to write an XMPP Ping plugin, and my Python is famously bad). I tweaked SleekBot a little, and now it also has a similar plugin system (although Fritzy will no doubt fix this up when he finds my bad code), wrote some helper scripts for the Psi MUC (like fact scripts, XEP lookup, Flyspray (our bug tracker) lookups etc.) and set to work on the main bulk of the interest.
The reason for my interest in SleekBot, apart from being a fun piece of kit, is that I’m writing an implementation of the Eggdrop script API as a plugin. What this means is that it’ll be possible to load, with no modification, all the TCL Eggdrop scripts which you love or hate on IRC directly into a bot in an XMPP MUC. This turns out to be a far more major undertaking than I’d originally thought, due to the scale of the eggdrop API, but I’m getting there.
At the weekend, I reached my first milestone. I’ve implemented enough of the API that very simple scripts, such as the Discworld Quotes script will work. Below is a quote of a genuine transaction between the previously mentioned Eggdrop script running directly in SleekBot:
[17:42:43] <kev> !disc
[17:42:43] <iono (Sleek)> "It wasn't blood in general he couldn't stand the sight of, it was just his blood in particular that was so upsetting. -- (Terry Pratchett, Sourcery)"
So, things are looking good, Eggdrop scripts running natively on XMPP bots. It’s not easy, at least in part because TCL’s not my favourite language, and I’m not too skilled in Python, but it’s progress, and I’m finding it pretty interesting. The next aim before full API support is bMotion running, and once that’s done iono will be in the Psi MUC being as irritating and pseudo-random as ever
