summaryrefslogtreecommitdiff
path: root/data
diff options
context:
space:
mode:
authorMatthias Hecker <mail@apoc.cc>2020-04-24 22:56:04 +0200
committerMatthias Hecker <mail@apoc.cc>2020-04-24 22:56:04 +0200
commit40ba5f69f763c47a4cd50439cc8c9937aab80dc4 (patch)
treeb9d048a2c8dde75e273a5215a99f05a3660ee86e /data
parentc1e2f3a2f2ada21d19b893795bd4d7d58962f8b6 (diff)
refactor: remove global bot instance, closes #42
Diffstat (limited to 'data')
-rw-r--r--data/rbot/plugins/search.rb8
1 files changed, 4 insertions, 4 deletions
diff --git a/data/rbot/plugins/search.rb b/data/rbot/plugins/search.rb
index b48e937e..b9ebcfa7 100644
--- a/data/rbot/plugins/search.rb
+++ b/data/rbot/plugins/search.rb
@@ -168,7 +168,7 @@ class SearchPlugin < Plugin
# If we return a single, full result, change the output to a more compact representation
if single
- fp = first_pars > 0 ? " -- #{Utils.get_first_pars(links, first_pars)}" : ""
+ fp = first_pars > 0 ? " -- #{Utils.get_first_pars(@bot, links, first_pars)}" : ""
m.reply("Result for %{what}: %{string}%{fp}" % {
:what => what, :string => result_string, :fp => fp
}, :overlong => :truncate)
@@ -179,7 +179,7 @@ class SearchPlugin < Plugin
return unless first_pars > 0
- Utils.get_first_pars urls, first_pars, :message => m
+ Utils.get_first_pars(@bot, urls, first_pars, :message => m)
end
def google(m, params)
@@ -232,7 +232,7 @@ class SearchPlugin < Plugin
if params[:lucky]
m.reply result_string.first
- Utils.get_first_pars([results.map {|url, title| url}.first], first_pars, :message => m)
+ Utils.get_first_pars(@bot, [results.map {|url, title| url}.first], first_pars, :message => m)
return
end
@@ -240,7 +240,7 @@ class SearchPlugin < Plugin
return unless first_pars > 0
- Utils.get_first_pars(results.map {|url, title| url}, first_pars, :message => m)
+ Utils.get_first_pars(@bot, results.map {|url, title| url}, first_pars, :message => m)
end
def google_define(m, what, params)