From 36a9b6341daab4e8e63c2ad04418ecba4d877e27 Mon Sep 17 00:00:00 2001 From: Giuseppe Bilotta Date: Wed, 7 Nov 2007 18:29:36 +0000 Subject: lart plugin: fix listlart/praise logic --- data/rbot/plugins/lart.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/data/rbot/plugins/lart.rb b/data/rbot/plugins/lart.rb index a70c67b8..657537f0 100644 --- a/data/rbot/plugins/lart.rb +++ b/data/rbot/plugins/lart.rb @@ -139,7 +139,7 @@ class LartPlugin < Plugin def handle_listlart(m, params) rx = Regexp.new(params[:lart].to_s, true) list = @larts.grep(rx) - if list + unless list.empty? m.reply list.join(" | "), :split_at => /\s+\|\s+/ else m.reply "no lart found matching #{params[:lart]}" @@ -161,7 +161,7 @@ class LartPlugin < Plugin def handle_listpraise(m, params) rx = Regexp.new(params[:praise].to_s, true) list = @praises.grep(rx) - if list + unless list.empty? m.reply list.join(" | "), :split_at => /\s+\|\s+/ else m.reply "no praise found matching #{params[:praise]}" -- cgit v1.2.3