summaryrefslogtreecommitdiff
path: root/data/rbot/plugins/markov.rb
diff options
context:
space:
mode:
authorGiuseppe Bilotta <giuseppe.bilotta@gmail.com>2009-02-12 22:32:24 +0100
committerGiuseppe Bilotta <giuseppe.bilotta@gmail.com>2009-02-12 22:32:24 +0100
commita5bb3b87831c566880c6f14569140cc81c807fe6 (patch)
treeee06edfeb365a40525c9151ebb5f912ee88c0e3c /data/rbot/plugins/markov.rb
parent3a8550d3e646b1edefdf039b9aea2d4c4d3c3efc (diff)
markov: show queue size only when not empty
Diffstat (limited to 'data/rbot/plugins/markov.rb')
-rw-r--r--data/rbot/plugins/markov.rb7
1 files changed, 5 insertions, 2 deletions
diff --git a/data/rbot/plugins/markov.rb b/data/rbot/plugins/markov.rb
index 6e692def..01856356 100644
--- a/data/rbot/plugins/markov.rb
+++ b/data/rbot/plugins/markov.rb
@@ -99,10 +99,13 @@ class MarkovPlugin < Plugin
def status(m,params)
if @bot.config['markov.enabled']
- m.reply "markov is currently enabled, #{probability?}% chance of chipping in, #{@learning_queue.length} messages in queue"
+ reply = "markov is currently enabled, #{probability?}% chance of chipping in"
+ l = @learning_queue.length
+ reply << ", #{l} messages in queue" if l > 0
else
- m.reply "markov is currently disabled"
+ reply = "markov is currently disabled"
end
+ m.reply reply
end
def ignore?(m=nil)