summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom Gilbert <tom@linuxbrit.co.uk>2005-08-24 19:14:23 +0000
committerTom Gilbert <tom@linuxbrit.co.uk>2005-08-24 19:14:23 +0000
commite92949d699eb5cacde8abbd1dddbefcb1d0d3a4a (patch)
treec9f0110a85cfd42d33f4971f1f4ca615f27f1935
parent1fd21891fde8e97cb91941c32f7e49c4f4881fa7 (diff)
fix nil lookups
-rw-r--r--lib/rbot/keywords.rb1
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])