diff options
author | Giuseppe Bilotta <giuseppe.bilotta@gmail.com> | 2007-08-14 17:19:27 +0000 |
---|---|---|
committer | Giuseppe Bilotta <giuseppe.bilotta@gmail.com> | 2007-08-14 17:19:27 +0000 |
commit | 1c06426e4a8fbd9655322627a57a3fb8d6fff798 (patch) | |
tree | 3902a374919176d7887f543326994c4bb17e689c /data | |
parent | 78e98dae69df36bbceed2e55220eee1647932cb9 (diff) |
search plugin: use single result format when a single hit is found
Diffstat (limited to 'data')
-rw-r--r-- | data/rbot/plugins/search.rb | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/data/rbot/plugins/search.rb b/data/rbot/plugins/search.rb index 8453b4ba..493db936 100644 --- a/data/rbot/plugins/search.rb +++ b/data/rbot/plugins/search.rb @@ -85,6 +85,7 @@ class SearchPlugin < Plugin m.reply "no results found for #{what}" return end + single ||= (results.length==1) urls = Array.new results = results[0...hits].map { |res| n = res[0] |