From a5bb3b87831c566880c6f14569140cc81c807fe6 Mon Sep 17 00:00:00 2001 From: Giuseppe Bilotta Date: Thu, 12 Feb 2009 22:32:24 +0100 Subject: markov: show queue size only when not empty --- data/rbot/plugins/markov.rb | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'data/rbot/plugins/markov.rb') 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) -- cgit v1.2.3