]> git.netwichtig.de Git - user/henk/code/ruby/rbot.git/blobdiff - data/rbot/plugins/dice.rb
* apparently, synthetic privmsgs for remotectl are hard. may need some massive rework...
[user/henk/code/ruby/rbot.git] / data / rbot / plugins / dice.rb
index 928da894f7532ae5307e5276de48fc853dd985ca..f0258c80f4f988761fc7b2e2cbbf508e40e7ccf1 100644 (file)
@@ -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