Improved error handling.
This commit is contained in:
parent
5bf96897e2
commit
dd7ed8a7ba
1 changed files with 4 additions and 1 deletions
|
@ -12,7 +12,10 @@ module Channel::Filter::Database
|
||||||
filter[:match].each {|key, value|
|
filter[:match].each {|key, value|
|
||||||
loop = true
|
loop = true
|
||||||
begin
|
begin
|
||||||
|
scan = []
|
||||||
|
if mail
|
||||||
scan = mail[ key.downcase.to_sym ].scan(/#{value}/i)
|
scan = mail[ key.downcase.to_sym ].scan(/#{value}/i)
|
||||||
|
end
|
||||||
if match && scan[0]
|
if match && scan[0]
|
||||||
puts " matching #{ key.downcase }:'#{ mail[ key.downcase.to_sym ] }' on #{value}"
|
puts " matching #{ key.downcase }:'#{ mail[ key.downcase.to_sym ] }' on #{value}"
|
||||||
match = true
|
match = true
|
||||||
|
|
Loading…
Reference in a new issue