From d8fd18fe30013ba7705aaeb5dd4521cbe013b824 Mon Sep 17 00:00:00 2001 From: Giuseppe Bilotta Date: Wed, 20 May 2009 14:44:53 +0200 Subject: search: gtime instead of time The time command is already defined by the corresponding plugin, so use gtime (like gdef and gcalc) for the Google clock. --- data/rbot/plugins/search.rb | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'data/rbot') diff --git a/data/rbot/plugins/search.rb b/data/rbot/plugins/search.rb index 716fcaaf..cf74e0e3 100644 --- a/data/rbot/plugins/search.rb +++ b/data/rbot/plugins/search.rb @@ -45,6 +45,8 @@ class SearchPlugin < Plugin "gcalc => use the google calculator to find the answer to " when "gdef" "gdef => use the google define mechanism to find a definition of " + when "gtime" + "gtime => use the google clock to find the current time at " when "wp" "wp [] => search for on Wikipedia. You can select a national to only search the national Wikipedia" when "unpedia" @@ -230,7 +232,7 @@ class SearchPlugin < Plugin return google(m, params) end - def time(m, params) + def gtime(m, params) where = params[:words].to_s where.sub!(/^\s*in\s*/, '') searchfor = CGI.escape("time in " + where) @@ -265,8 +267,8 @@ 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 +plugin.map "gtime *words", :action => 'gtime', :threaded => true plugin.map "wp :lang *words", :action => 'wikipedia', :requirements => { :lang => /^\w\w\w?$/ }, :threaded => true plugin.map "wp *words", :action => 'wikipedia', :threaded => true plugin.map "unpedia *words", :action => 'unpedia', :threaded => true -plugin.map "time *words", :action => 'time', :threaded => true -- cgit v1.2.3