/ForkingDongles-old

An IRC bot that forks dongles.

Primary LanguageRuby

ForkingDongles

An asynchronous, pluggable, evented IRC bot framework written using EventMachine and Ruby.

To-Do

  • Proper documentation: Documentation that is formatted and understandable.
  • Modular plugins: Plugins that are actually modular, getting rid of several issues:
class ForkingDongles::Plugin::Counter < ForkingDongles::Plugin::Base
  def initialize bot
    super
    
    @bot.help['*count'] = '*count - Counts the amount the command has been called.'
    @bot.help['*uncount'] = '*uncount - Does the same as *count, but decrements.'
    @count = 0
    
    privmsg? /^\*count$/, &method(:count)
    privmsg? /^\*uncount$/ do |matches, source, channel, line|
      username, ident, hostname = source.to_user
      
      privmsg! [channel.is_channel? ? channel : username], "Counted #{@count -= 1} times so far"
    end
  end
  
  def count matches, source, channel, line
    username, ident, hostname = source.to_user
    
    privmsg! [channel.is_channel? ? channel : username], "Counted #{@count += 1} times so far"
  end
end

Usage

Barely any work is required to get the bot running. Edit the variables in config.yml, and start the bot with ruby forkingdongles.rb. The script should install required gems, unless you have added a plugin and forgot to add them to the Gemfile.