MaBot is an IRC bot which is wrote in perl, the first versions was based on the Net::IRC module, but since the Net::IRC module seems to be very unmaintained these days, version 5 of the MaBot was rewritten to work with POE::Component::IRC instead.

To run it you only need perl, and the only perl module you need is POE::Component::IRC, which can be downloaded from CPAN, to install it run:
perl -MCPAN -eshell
install POE::Component::IRC

The idea with this bot is to be modular, stable and dynamic, hence parts of the bot can be edited and reloaded on the fly, and modules can be loaded or unloaded as you wish.

The Bot:

The latest version of the bot is 5.1 and can be downloaded here. It consists of three mainfiles, the script (mabot), the configure file (etc/<name>cfg) and the bot control module (modules/

Here you can find the ChangeLog.


To install the bot, you just download it and extract it (gtar zxf mabot-5.1.tgz). All the files needed to run the bot are included in the tar file and will be extracted to a directory named "mabot". To create a configure file you can use the setup script:

To start the bot you simply type ./mabot:

Use ./mabot -h to see command line options.

The framework itself has quite a lot of features, you can change all of the settings on the fly and they will take effect immediately. You can load/unloda modules and it comes with a set of useful functions which you can use to write your own modules.

The modules i've written can be found below.

The bot can maintain a list of users, and didives them into different levels, depending on what they should be able to do.

Once the bot is up and running you give it unstructions over PRIVMSG, for example /msg <botname> list, to see what modules it have loaded.

If you want the old Net::IRC version of the bot you can download version 4.0 instead.


Here is the documentation.


Its fairly easy to write modules for this bot, its descriped in the docs and there is also a template for modules.

Here are some modules i wrote:
dns !dns <argument>, resolves the argument, it currently depending on two shellscripts, which you might have to customize.
epoch !epoch <argument> will convert the epoch to realtime. If you run it without arguments, it will return the current epoch.
friday !friday, a sample how to make something count down, this script shows the remaining time til friday 5 pm.
helloworld !helloworld, a true example script.
last Records up to the 15 last messages said on any channel the bot is on, the messages will then be printed when a user types !last (or !l, which is the alias for this module).
link Listen to anything which is said on a channel, if a link is encountered (i.e. http:// ) the lenght of it will be checked, if its long enough (by default more than 70 characters) it will be saved to a text file. This enables you to print shorterend URL's of long URL's.
morse !morse is another stupid script, it takes an ASCII string as argument and tells you what it would be in morse code...
rate !rate, this script uses to calculate exchange rates, there are two ways of usage, !rate from_currency to_currency, which will tell you the current exchange rate, or !rate from_currency to_currency amount, which will calculate the amount for you.
reverse !reverse, it will reverse the argument, for example "!reverse hello there" would return "ereht olleh". Its a stupid module, but i wrote it when i was bored.
smiley !smiley, it will display a random smiley from the smileyfile, if you run !smiley <argument> it will add the argument to the file, !smiley status will show the number of smileys stored
time !time <argument>, where argument should be either a town or a major city, the argument may also be a nickname, if the user have a domain in the form <something>.<country>.<something>.domain, unless you customise the script.
vote A votescript, it has a lot of subcommands, i suggest that you load the module and then types !vote help

15:19 22/Nov/2013
footer image