diff options
author | Giuseppe Bilotta <giuseppe.bilotta@gmail.com> | 2006-10-20 00:15:51 +0000 |
---|---|---|
committer | Giuseppe Bilotta <giuseppe.bilotta@gmail.com> | 2006-10-20 00:15:51 +0000 |
commit | 38dde2ea8379f1919e39a4b87c91faae4b068b66 (patch) | |
tree | 53506af600595c3665603a6c06aff24648169c45 /data/rbot/plugins/dice.rb | |
parent | 634cf13d1ebffd7598bb713707be5b174834a3dd (diff) |
dice plugin now acts on 'roll' too, and it uses the nickreply method. Fix ticket #66
Diffstat (limited to 'data/rbot/plugins/dice.rb')
-rw-r--r-- | data/rbot/plugins/dice.rb | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/data/rbot/plugins/dice.rb b/data/rbot/plugins/dice.rb index 928da894..f0258c80 100644 --- a/data/rbot/plugins/dice.rb +++ b/data/rbot/plugins/dice.rb @@ -61,7 +61,7 @@ class DicePlugin < Plugin def privmsg(m) unless(m.params && m.params =~ /^[0-9]*d[0-9]+([+-]([0-9]+|[0-9]*d[0-9])+)*$/) - m.reply "incorrect usage: " + help(m.plugin) + m.nickreply "incorrect usage: " + help(m.plugin) return end a = m.params.scan(/^[0-9]*d[0-9]+|[+-][0-9]*d[0-9]+|[+-][0-9]+/) @@ -72,10 +72,11 @@ class DicePlugin < Plugin r = r + tmp.total.to_i t = t + tmp.view.to_s end - m.reply r.to_s + " | " + t + m.nickreply r.to_s + " | " + t end end plugin = DicePlugin.new plugin.register("dice") +plugin.register("roll") ############################################## #fin |