summaryrefslogtreecommitdiff
path: root/data/rbot/plugins
diff options
context:
space:
mode:
authorGiuseppe Bilotta <giuseppe.bilotta@gmail.com>2007-08-14 17:19:27 +0000
committerGiuseppe Bilotta <giuseppe.bilotta@gmail.com>2007-08-14 17:19:27 +0000
commit1c06426e4a8fbd9655322627a57a3fb8d6fff798 (patch)
tree3902a374919176d7887f543326994c4bb17e689c /data/rbot/plugins
parent78e98dae69df36bbceed2e55220eee1647932cb9 (diff)
search plugin: use single result format when a single hit is found
Diffstat (limited to 'data/rbot/plugins')
-rw-r--r--data/rbot/plugins/search.rb1
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]