From 607482763bfd76b7e749cad80a83ff7157d37026 Mon Sep 17 00:00:00 2001 From: Giuseppe Bilotta Date: Wed, 21 Nov 2007 22:19:26 +0000 Subject: New IRC Framework: warn, don't raise, on case mismatch --- lib/rbot/irc.rb | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'lib/rbot') 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 -- cgit v1.2.3