X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;f=data%2Frbot%2Fplugins%2Fexcuse.rb;h=ad0e8334e58f7ad3d5889847f4502ceb59131ae4;hb=052217de30c59206d7025b582d4604557a747470;hp=38e85ad658fb44a36f6f7150ace92ebbcebc39c4;hpb=21949774b91eaec6ecde4eaa8ad121e2c0a36b87;p=user%2Fhenk%2Fcode%2Fruby%2Frbot.git diff --git a/data/rbot/plugins/excuse.rb b/data/rbot/plugins/excuse.rb index 38e85ad6..ad0e8334 100644 --- a/data/rbot/plugins/excuse.rb +++ b/data/rbot/plugins/excuse.rb @@ -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"