# File rbot/plugins/quotes.rb, line 56 def countquote(source, channel=nil, regexp=nil) unless(channel) total=0 @lists.each_value {|l| total += l.compact.length } return total end 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}/ } else matches = @lists[channel].compact end return matches.length end