summaryrefslogtreecommitdiff
path: root/data
diff options
context:
space:
mode:
authorGiuseppe Bilotta <giuseppe.bilotta@gmail.com>2010-08-17 09:24:12 +0200
committerGiuseppe Bilotta <giuseppe.bilotta@gmail.com>2010-08-17 09:24:12 +0200
commitd372ec5babdbf5e6a9c49b21d16bcae74d0ff01c (patch)
tree09c8256f5d4890459da01eaf171a1544074396e2 /data
parent9eef522553cb2de99388948dedf0cf5d698b635a (diff)
search: skip non-search-results link
This prevents the regexp scan to grab the Google Privacy link when no results were found.
Diffstat (limited to 'data')
-rw-r--r--data/rbot/plugins/search.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/data/rbot/plugins/search.rb b/data/rbot/plugins/search.rb
index aec8b134..8b3b6848 100644
--- a/data/rbot/plugins/search.rb
+++ b/data/rbot/plugins/search.rb
@@ -90,7 +90,7 @@ class SearchPlugin < Plugin
m.reply "error googling for #{what}"
return
end
- results = wml.scan(GOOGLE_WAP_LINK)
+ results = wml.match('<p align="center">').pre_match.scan(GOOGLE_WAP_LINK)
if results.length == 0
m.reply "no results found for #{what}"