From a08b4def5c276df964ae2a8d9c3f661593d757e6 Mon Sep 17 00:00:00 2001 From: Tom Gilbert Date: Sat, 16 Jul 2005 01:18:13 +0000 Subject: various fixes by me, plus most of Rene's patch (#1). --- rbot/plugins/quotes.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'rbot/plugins/quotes.rb') diff --git a/rbot/plugins/quotes.rb b/rbot/plugins/quotes.rb index 072e352a..0e46b495 100644 --- a/rbot/plugins/quotes.rb +++ b/rbot/plugins/quotes.rb @@ -64,7 +64,7 @@ class QuotePlugin < Plugin return 0 unless(@lists.has_key?(channel)) return 0 unless(@lists[channel].length > 0) if(regexp) - matches = @lists[channel].compact.find_all {|a| a.quote =~ /#{regexp}/ } + matches = @lists[channel].compact.find_all {|a| a.quote =~ /#{regexp}/i } else matches = @lists[channel].compact end @@ -73,7 +73,7 @@ class QuotePlugin < Plugin def searchquote(source, channel, regexp) return nil unless(@lists.has_key?(channel)) return nil unless(@lists[channel].length > 0) - matches = @lists[channel].compact.find_all {|a| a.quote =~ /#{regexp}/ } + matches = @lists[channel].compact.find_all {|a| a.quote =~ /#{regexp}/i } if(matches.length > 0) return matches[rand(matches.length)], @lists[channel].length - 1 else -- cgit v1.2.3