From e92949d699eb5cacde8abbd1dddbefcb1d0d3a4a Mon Sep 17 00:00:00 2001 From: Tom Gilbert Date: Wed, 24 Aug 2005 19:14:23 +0000 Subject: fix nil lookups --- lib/rbot/keywords.rb | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/rbot/keywords.rb b/lib/rbot/keywords.rb index 5de5a14a..8065e8b8 100644 --- a/lib/rbot/keywords.rb +++ b/lib/rbot/keywords.rb @@ -215,6 +215,7 @@ module Irc # lookup keyword +key+, return it or nil def [](key) + return nil if key.nil? debug "keywords module: looking up key #{key}" if(@keywords.has_key?(key)) return Keyword.restore(@keywords[key]) -- cgit v1.2.3