termibot is an IRC bot (and possibly XMPP bot, in the future) written in Ruby. It is based on plugins; as much code as possible, even basic parts of the IRC protocol like authentication and pings, is implemented as a plugin.

termibot started life as coursework for SOFT218, "Software Development In Java", when I suddenly realised how I could write a plugin architecture in an OO language. I wrote the first prototype in Ruby, then reimplemented it in Java for submission. Later, I took the original Ruby codebase and started developing it further.

Requirements

  • Ruby, obviously. 1.8.7 works; 1.8.6 worked, but needs retesting. Versions <1.8.6 and >=1.9 are untested.
  • For the bot itself, and many plugins, only the Ruby standard library is needed.
  • For the Url plugin (which provides commands for using Google and for getting shortened versions of URLs), Hpricot is needed.

Download

Available via git.

Bugs

Tracked on this page. Feel free to add requests to the wishlist.

Usage

  • Edit config.yml.example as appropriate and save as config.yml.
  • Run ./bot.rb ./config.yml.

Note that it must be run from the current directory at the moment. This is a feature, honest.

Licence

Copyright © 2008 Benjamin M. A'Lee <bma@subvert.org.uk>

Permission to use, copy, modify, and/or distribute this software for any
purpose with or without fee is hereby granted, provided that the above
copyright notice and this permission notice appear in all copies.

THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.

Bugs/Feature Requests

Feel free to add your request here.

  • FEATURE — replace mysql with mongodb. Centralised and abstracted API for data storage.
  • FEATURE — improved plugin API with more powerful events: - timed events - random events?
  • FEATURE — logging. Use mongodb/redis.
  • FEATURE — json web api. request karma etc., directly to mongodb find()? other collections (log, etc.?)
  • BUG — The way that karma mapping is currently implemented is destructive; i.e., it modifies old entries. Instead, it should store a mapping but not modify old entries (or new ones); then, when a value is requested, it should total up all the mapped values and return that.
  • BUG — currently it is possible for individuals to karma the same item repeatedly in a short period of time. This is SODDING ANNOYING and should be stopped. 15-minute timeout, multiplied by the amount of time remaining for infractions? e.g. additional karma 1min before end of timeout -> 1*15=15 additional minutes; 15min before end -> 15*15=225 additional minutes.