]> git.netwichtig.de Git - user/henk/code/ruby/rbot.git/commitdiff
ircbot: reinstante @bot.channels
authorGiuseppe Bilotta <giuseppe.bilotta@gmail.com>
Wed, 6 May 2009 15:48:22 +0000 (17:48 +0200)
committerGiuseppe Bilotta <giuseppe.bilotta@gmail.com>
Wed, 6 May 2009 15:48:22 +0000 (17:48 +0200)
When the new IRC framework was introduced, the old @channels Hash and
its accessor for @bot were dismissed.

Reintroduce it for backwards compatibility.

lib/rbot/ircbot.rb

index 35fc2dfd4ac128e548d0bb2ae42245048c2b950e..70be2a901648a45f8fa720b3ec1d3b57903ddba9 100644 (file)
@@ -211,11 +211,16 @@ class Bot
     @client.user
   end
 
-  # bot User in the client/server connection
+  # bot nick in the client/server connection
   def nick
     myself.nick
   end
 
+  # bot channels in the client/server connection
+  def channels
+    myself.channels
+  end
+
   # nick wanted by the bot. This defaults to the irc.nick config value,
   # but may be overridden by a manual !nick command
   def wanted_nick