summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--data/rbot/plugins/markov.rb10
1 files changed, 7 insertions, 3 deletions
diff --git a/data/rbot/plugins/markov.rb b/data/rbot/plugins/markov.rb
index 14cd0f99..4a7a7328 100644
--- a/data/rbot/plugins/markov.rb
+++ b/data/rbot/plugins/markov.rb
@@ -106,8 +106,12 @@ class MarkovPlugin < Plugin
end
def probability(m, params)
- @registry['probability'] = params[:probability].to_i
- m.okay
+ if params[:probability]
+ @registry['probability'] = params[:probability].to_i
+ m.okay
+ else
+ m.reply _("markov has a %{prob}% chance of chipping in") % { :prob => probability? }
+ end
end
def disable(m, params)
@@ -202,5 +206,5 @@ plugin.map 'markov disable', :action => "disable"
plugin.map 'markov status', :action => "status"
plugin.map 'chat about :seed1 :seed2', :action => "chat"
plugin.map 'chat', :action => "rand_chat"
-plugin.map 'markov probability :probability', :action => "probability",
+plugin.map 'markov probability [:probability]', :action => "probability",
:requirements => {:probability => /^\d+%?$/}