irkotr0id – A modular IRC bot written in Python

Today I’ve released irkotr0id, a modular and totally customizable IRC bot written in Python from the ground up.

I’ve been working on this project for a while with a friend of mine (I can’t take all the credit), and now that the project is mature and stable, we’ve decided to share it so you and others can benefit from what it offers.

irkotr0id consists of two parts:

  • The framework: This is the core code that handles all the basic operations of the bot (connection handling, joining channels, sending queries…). The core code gives you the possibility to extend the bot’s features via a plugins system.
  • The plugins: These are minimal Python modules that handle specific tasks. If you wish to add new features to the bot, you should write a plugin.

irkotr0id comes shipped with some plugins that you can try. Taking a look at those may help you with writing your plugin:

  • weather: Gives info about the weather. The bot responds to the ‘!weather’ command and returns the weather of the location given as parameter.
  • rootme: Fetches user score from root-me.org . Command is ‘!rootme [user]’
  • plus_one: Give of take away points to/from a user. Example: ‘+1 nisay’
  • notice: Saves message and delivers them to a user when (s)he (re)joins a channel
  • repeater: Kind of a parrot plugin. Can be really annoying.

Usage is pretty straightforward. You need to fill the desired informations in src/config.json and either launch  ./start  script (connects to freenode by default) or via the command line:

./irkotroid -H irc.freenode.org -c config.json

Adding plugins is pretty simple too. I won’t go into the details here as it is not the purpose of this blog post, but everything is detailed in the github repo.

So go ahead and play with irtkotr0id, write your plugins and customize your IRC bot !