diff --git a/isaac.gemspec b/isaac.gemspec index 3d28aac..c29a633 100644 --- a/isaac.gemspec +++ b/isaac.gemspec @@ -1,7 +1,7 @@ Gem::Specification.new do |s| s.name = "isaac" - s.version = "0.3.0" - s.date = "2009-12-21" + s.version = "0.3.1" + s.date = "2014-02-28" s.summary = "The smallish DSL for writing IRC bots" s.email = "harry@vangberg.name" s.homepage = "http://github.com/ichverstehe/isaac" diff --git a/lib/isaac/bot.rb b/lib/isaac/bot.rb index 21fa31e..2c1d9cd 100644 --- a/lib/isaac/bot.rb +++ b/lib/isaac/bot.rb @@ -7,7 +7,7 @@ module Isaac class Bot attr_accessor :config, :irc, :nick, :channel, :message, :user, :host, :match, - :error + :error, :invite def initialize(&b) @events = {} @@ -170,6 +170,8 @@ def parse(input) message "PONG :#{msg.params.first}" elsif msg.command == "PONG" @queue.unlock + elsif msg.command == "INVITE" + @bot.dispatch(:invite, msg) else event = msg.command.downcase.to_sym @bot.dispatch(event, msg) @@ -267,7 +269,7 @@ def message private # This is a late night hack. Fix. def regular_command? - %w(PRIVMSG JOIN PART QUIT).include? command + %w(INVITE PRIVMSG JOIN PART QUIT).include? command end end