diff options
author | Giuseppe Bilotta <giuseppe.bilotta@gmail.com> | 2007-11-21 22:19:26 +0000 |
---|---|---|
committer | Giuseppe Bilotta <giuseppe.bilotta@gmail.com> | 2007-11-21 22:19:26 +0000 |
commit | 607482763bfd76b7e749cad80a83ff7157d37026 (patch) | |
tree | 6fca4a745aba988f08223086117d7150979ccf78 /lib | |
parent | d75998312865eabd2c28562e6ab96f919540b1a6 (diff) |
New IRC Framework: warn, don't raise, on case mismatch
Diffstat (limited to 'lib')
-rw-r--r-- | lib/rbot/irc.rb | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/lib/rbot/irc.rb b/lib/rbot/irc.rb index 86ca0fab..9ce57816 100644 --- a/lib/rbot/irc.rb +++ b/lib/rbot/irc.rb @@ -109,12 +109,16 @@ module Irc return self.upper == other.upper && self.lower == other.lower
end
- # Raise an error if _arg_ and self are not the same Casemap
+ # Give a warning if _arg_ and self are not the same Casemap
#
def must_be(arg)
other = arg.to_irc_casemap
- raise "Casemap mismatch (#{self.inspect} != #{other.inspect})" unless self == other
- return true
+ if self == other
+ return true
+ else
+ warn "Casemap mismatch (#{self.inspect} != #{other.inspect})"
+ return false
+ end
end
end
|