diff options
author | Giuseppe Bilotta <giuseppe.bilotta@gmail.com> | 2007-11-07 18:29:36 +0000 |
---|---|---|
committer | Giuseppe Bilotta <giuseppe.bilotta@gmail.com> | 2007-11-07 18:29:36 +0000 |
commit | 36a9b6341daab4e8e63c2ad04418ecba4d877e27 (patch) | |
tree | 91c7635073cc627c16ab194547a399dc5a133683 | |
parent | 6b371332a5de74de6582cfdee56aac4779f4f2a6 (diff) |
lart plugin: fix listlart/praise logic
-rw-r--r-- | data/rbot/plugins/lart.rb | 4 |
1 files 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]}" |