]> git.netwichtig.de Git - user/henk/code/ruby/rbot.git/blobdiff - data/rbot/plugins/excuse.rb
chucknorris: read gzip stream before passing it to YAML.load
[user/henk/code/ruby/rbot.git] / data / rbot / plugins / excuse.rb
index 38e85ad658fb44a36f6f7150ace92ebbcebc39c4..61f38bd678ec725f2b57acfef019bdf6bdad584d 100644 (file)
@@ -387,7 +387,7 @@ class ExcusePlugin < Plugin
 "Dyslexics retyping hosts file on servers",
 "The Internet is being scanned for viruses.",
 "Your computer's union contract is set to expire at midnight.",
-"Bad user karma.",
+"Bad reputation.",
 "/dev/clue was linked to /dev/null",
 "Increased sunspot activity.",
 "We already sent around a notice about that.",
@@ -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"