single ? u : "#{n}. #{Bold}#{t}#{Bold}: #{u}"
}.join(" | ")
+ if params[:lucky]
+ m.reply urls.first
+ return
+ end
+
# If we return a single, full result, change the output to a more compact representation
if single
m.reply "Result for %s: %s -- %s" % [what, results, Utils.get_first_pars(urls, first_pars)], :overlong => :truncate
end
+ def lucky(m, params)
+ params.merge!(:lucky => true)
+ google(m, params)
+ end
+
def gcalc(m, params)
what = params[:words].to_s
searchfor = CGI.escape(what)
plugin.map "search *words", :action => 'google', :threaded => true
plugin.map "google *words", :action => 'google', :threaded => true
+plugin.map "lucky *words", :action => 'lucky', :threaded => true
plugin.map "gcount *words", :action => 'gcount', :threaded => true
plugin.map "gcalc *words", :action => 'gcalc', :threaded => true
plugin.map "gdef *words", :action => 'gdef', :threaded => true