]> git.netwichtig.de Git - user/henk/code/ruby/rbot.git/blobdiff - data/rbot/plugins/excuse.rb
imdb plugin: some titles with extra info where missed when searching for movies by...
[user/henk/code/ruby/rbot.git] / data / rbot / plugins / excuse.rb
index 38e85ad658fb44a36f6f7150ace92ebbcebc39c4..ad0e8334e58f7ad3d5889847f4502ceb59131ae4 100644 (file)
@@ -459,12 +459,12 @@ class ExcusePlugin < Plugin
   def help(plugin, topic="")
     "excuse => supply a random excuse"
   end
-  def privmsg(m)
-    excuse = @@excuses[rand(@@excuses.length)]
-    m.reply excuse
+
+  def excuse(m, params)
+    m.reply @@excuses.pick_one
   end
 end
 
 plugin = ExcusePlugin.new
-plugin.register("excuse")
+plugin.map "excuse"