X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;f=data%2Frbot%2Fplugins%2Fexcuse.rb;h=61f38bd678ec725f2b57acfef019bdf6bdad584d;hb=8b811d21babf8f9e5a10a953b595d55ebd08820d;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..61f38bd6 100644 --- a/data/rbot/plugins/excuse.rb +++ b/data/rbot/plugins/excuse.rb @@ -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"