]> git.netwichtig.de Git - user/henk/code/ruby/rbot.git/commitdiff
factoids plugin: options to facts() method may be nil, not just empty
authorGiuseppe Bilotta <giuseppe.bilotta@gmail.com>
Tue, 12 Feb 2008 22:52:37 +0000 (23:52 +0100)
committerGiuseppe Bilotta <giuseppe.bilotta@gmail.com>
Tue, 12 Feb 2008 22:52:37 +0000 (23:52 +0100)
data/rbot/plugins/factoids.rb

index da437c84df121e2715513241314c8bde5e8c1da4..2a75fd52afb92af03d90343083c7749f404a0051 100644 (file)
@@ -289,7 +289,7 @@ class FactoidsPlugin < Plugin
 
   def facts(m, params)
     total = @factoids.length
-    if params[:words].empty? and params[:rx].empty?
+    if params[:words].nil_or_empty? and params[:rx].nil_or_empty?
       m.reply _("I know %{total} facts" % { :total => total })
     else
       if params[:words].empty?