From: Giuseppe Bilotta Date: Tue, 12 Feb 2008 22:52:37 +0000 (+0100) Subject: factoids plugin: options to facts() method may be nil, not just empty X-Git-Url: https://git.netwichtig.de/gitweb/?a=commitdiff_plain;h=d7df65437c3328141ae6faf372d334b9708fe078;hp=b4a2acb36685b6aeb4e257036cb32175a9aa8b0e;p=user%2Fhenk%2Fcode%2Fruby%2Frbot.git factoids plugin: options to facts() method may be nil, not just empty --- diff --git a/data/rbot/plugins/factoids.rb b/data/rbot/plugins/factoids.rb index da437c84..2a75fd52 100644 --- a/data/rbot/plugins/factoids.rb +++ b/data/rbot/plugins/factoids.rb @@ -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?