]> git.netwichtig.de Git - user/henk/code/ruby/rbot.git/blobdiff - lib/rbot/ircbot.rb
* handle invites properly -- forgot more than half the files :/
[user/henk/code/ruby/rbot.git] / lib / rbot / ircbot.rb
index 9a6685da5472909b4dbe5c2f16a42a6d4edd475f..f994875002d4fcf7f1d39a5a9eab0b25eb72e9ae 100644 (file)
@@ -668,9 +668,10 @@ class Bot
       @plugins.delegate("kick", m)
     }
     @client[:invite] = proc {|data|
-      if data[:target] == myself
-        join data[:channel] if @auth.allow?("join", data[:source], data[:source].nick)
-      end
+      m = InviteMessage.new(self, server, data[:source], data[:target], data[:channel])
+
+      @plugins.delegate("listen", m)
+      @plugins.delegate("invite", m)
     }
     @client[:changetopic] = proc {|data|
       m = TopicMessage.new(self, server, data[:source], data[:channel], data[:topic])