From: Giuseppe Bilotta Date: Wed, 23 Apr 2008 22:29:28 +0000 (+0200) Subject: config core botmodule: only show possible keys summary when more than one key was... X-Git-Url: https://git.netwichtig.de/gitweb/?a=commitdiff_plain;h=d4ef91d819164d3a46dc2ce9e4a7ce14b6f5b043;hp=4a5eafbb067aaee8715a55ac52e292ce22b668c8;p=user%2Fhenk%2Fcode%2Fruby%2Frbot.git config core botmodule: only show possible keys summary when more than one key was found --- diff --git a/lib/rbot/core/config.rb b/lib/rbot/core/config.rb index 439d7c51..79b711f3 100644 --- a/lib/rbot/core/config.rb +++ b/lib/rbot/core/config.rb @@ -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