diff options
author | Tom Gilbert <tom@linuxbrit.co.uk> | 2005-08-24 19:14:23 +0000 |
---|---|---|
committer | Tom Gilbert <tom@linuxbrit.co.uk> | 2005-08-24 19:14:23 +0000 |
commit | e92949d699eb5cacde8abbd1dddbefcb1d0d3a4a (patch) | |
tree | c9f0110a85cfd42d33f4971f1f4ca615f27f1935 | |
parent | 1fd21891fde8e97cb91941c32f7e49c4f4881fa7 (diff) |
fix nil lookups
-rw-r--r-- | lib/rbot/keywords.rb | 1 |
1 files changed, 1 insertions, 0 deletions
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]) |