summaryrefslogtreecommitdiff
path: root/rbot/plugins/eightball.rb
diff options
context:
space:
mode:
Diffstat (limited to 'rbot/plugins/eightball.rb')
-rw-r--r--rbot/plugins/eightball.rb5
1 files changed, 3 insertions, 2 deletions
diff --git a/rbot/plugins/eightball.rb b/rbot/plugins/eightball.rb
index 6d123b34..64748490 100644
--- a/rbot/plugins/eightball.rb
+++ b/rbot/plugins/eightball.rb
@@ -8,11 +8,12 @@ class EightBallPlugin < Plugin
def help(plugin, topic="")
"magic 8-ball ruby bot module written by novex for nvinfo on #dumber@quakenet, usage:<botname> 8ball will i ever beat this cancer?"
end
- def privmsg(m)
+ def eightball(m, params)
answers = @answers[rand(@answers.length)]
action = "shakes the magic 8-ball... #{answers}"
@bot.action m.replyto, action
end
end
plugin = EightBallPlugin.new
-plugin.register("8ball")
+plugin.map '8ball', :action => 'usage'
+plugin.map '8ball *params', :action => 'eightball'