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]}"
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]}"