Browsing articles tagged with " spherebot"


Script Information

SphereBot is one of my more ongoing projects, although I haven’t had much time for IRC as much lately, so I’ve taken a break from development for an undetermined amount of time. SphereBot is an IRC bot written in Perl, designed to be completely modular. Not only is it modular, the modules can be written in any language that can read environment variables (or use the deprecated method of ARGV variables), and write to STDOUT. (Basically a CGI-like interface.) SphereBot is the successor to BoxBot. The modules can be bound to any IRC event, usually by use of regexes, but in actuality it can be done with any Perl one-liner.

The latest downloadable release of SphereBot and the original modules are available below. These are unstable, non-publicly released versions made available to specific people for testing purposes. (Please see the included readme for use & development.)

Download here.

Backslash bug – I have recently become aware of a bug affecting SphereBot’s escaping when passing data from IRC to modules, that ends up leaving a trailing ‘\’ hanging on the end of the script parameters passed to a module. So far I’ve only heard about it occurring in default Perl installs under Ubuntu, but it is likely to effect some other configurations as well.

How do you know if it effects you? Easy. Load the ‘raw’ module and as an administrator for the bot, issue this command (using your channel instead of #channel, and your prefix instead of -, obviously):

-raw PRIVMSG #channel :Test message.

If your response is similar to the one below, you are not affected.

<SphereBot> Test message.

If your response is similar to the one below, then you are affected by this bug.

<SphereBot> Test message.\

To fix it, open functions/ and head towards lines 244-247 and add line 248 (shown highlighted below):

$cmd =~ s/\[\@(.*?)\:(.*?)\]/$$1{$2}/ig;
$cmd =~ s/\[\%(.*?)\]/$$1/ig;
$cmd =~ s/(.)?/\\$1/ig;
$cmd =~ s/\\ / /ig;
$cmd =~ s/\\$//ig;

Save the file & restart the bot. Problem should be sorted.
I’ll update the tarball at some point with this, but I don’t have time right now.