From d7df65437c3328141ae6faf372d334b9708fe078 Mon Sep 17 00:00:00 2001 From: Giuseppe Bilotta Date: Tue, 12 Feb 2008 23:52:37 +0100 Subject: factoids plugin: options to facts() method may be nil, not just empty --- data/rbot/plugins/factoids.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'data') 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? -- cgit v1.2.3