# File lib/rbot/core/config.rb, line 71 def handle_search(m, params) rx = Regexp.new(params[:rx].to_s, true) cfs = [] @bot.config.items.each do |k, v| cfs << [Bold + k.to_s + Bold, v.desc] if k.to_s.match(rx) or (v.desc.match(rx) rescue false) end 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}.sort.join(', ') } if cfs.length > 1 m.reply cfs.map { |c| c.join(': ') }.join("\n") end end