]> git.netwichtig.de Git - user/henk/code/ruby/rbot.git/commitdiff
config core botmodule: only show possible keys summary when more than one key was...
authorGiuseppe Bilotta <giuseppe.bilotta@gmail.com>
Wed, 23 Apr 2008 22:29:28 +0000 (00:29 +0200)
committerGiuseppe Bilotta <giuseppe.bilotta@gmail.com>
Wed, 23 Apr 2008 22:29:28 +0000 (00:29 +0200)
lib/rbot/core/config.rb

index 439d7c5104c6cb0a212546ff980b05eeb28c6335..79b711f35ded7b74dabb9d7d26d29e3d98a26423 100644 (file)
@@ -77,7 +77,7 @@ class ConfigModule < CoreBotModule
     if cfs.empty?
       m.reply _("no config key found matching %{r}") % { :r => params[:rx].to_s}
     else
-      m.reply _("possible keys: %{kl}") % { :kl => cfs.map { |c| c.first}.join(', ') }
+      m.reply _("possible keys: %{kl}") % { :kl => cfs.map { |c| c.first}.join(', ') } if cfs.length > 1
       m.reply cfs.map { |c| c.join(': ') }.join("\n")
     end
   end