diff --git a/plugins/Google/config.py b/plugins/Google/config.py index 2ab8b225a..21f58ef35 100644 --- a/plugins/Google/config.py +++ b/plugins/Google/config.py @@ -98,9 +98,9 @@ conf.registerChannelValue(Google, 'maximumResults', conf.registerChannelValue(Google, 'defaultLanguage', Language('lang_en', """Determines what default language is used in searches. If left empty, no specific language will be requested.""")) -conf.registerChannelValue(Google, 'safeSearch', - SafeSearch('moderate', """Determines what level of safeSearch to use by - default. 'active' - most filtering, 'moderate' - default filtering, 'off' - - no filtering""")) +conf.registerChannelValue(Google, 'searchFilter', + SafeSearch('moderate', """Determines what level of search filtering to use + by default. 'active' - most filtering, 'moderate' - default filtering, + 'off' - no filtering""")) # vim:set shiftwidth=4 softtabstop=4 expandtab textwidth=79: diff --git a/plugins/Google/plugin.py b/plugins/Google/plugin.py index 9abb657b5..165cddd24 100644 --- a/plugins/Google/plugin.py +++ b/plugins/Google/plugin.py @@ -81,7 +81,7 @@ class Google(callbacks.PluginRegexp): Valid options are: smallsearch - True/False (Default: False) - safesearch - {active,moderate,off} (Default: "moderate") + filter - {active,moderate,off} (Default: "moderate") language - Restrict search to documents in the given language (Default: "lang_en") """ @@ -98,7 +98,7 @@ class Google(callbacks.PluginRegexp): opts['rsz'] = 'small' else: opts['rsz'] = 'large' - elif k == 'safesearch': + elif k == 'filter': opts['safe'] = v elif k == 'language': opts['lr'] = v @@ -106,7 +106,7 @@ class Google(callbacks.PluginRegexp): if 'lr' not in opts and defLang: opts['lr'] = defLang if 'safe' not in opts: - opts['safe'] = self.registryValue('safeSearch', dynamic.channel) + opts['safe'] = self.registryValue('searchFilter', dynamic.channel) if 'rsz' not in opts: opts['rsz'] = 'large' @@ -154,10 +154,10 @@ class Google(callbacks.PluginRegexp): lucky = wrap(lucky, ['text']) def google(self, irc, msg, args, optlist, text): - """ [--{safesearch,language} ] + """ [--{filter,language} ] Searches google.com for the given string. As many results as can fit - are included. --language accepts a language abbreviation; --safesearch + are included. --language accepts a language abbreviation; --filter accepts a filtering level ('active', 'moderate', 'off'). """ if 'language' in optlist and optlist['language'].lower() not in \ @@ -172,7 +172,7 @@ class Google(callbacks.PluginRegexp): irc.reply(self.formatData(data['responseData']['results'], bold=bold, max=max)) google = wrap(google, [getopts({'language':'something', - 'safesearch':''}), + 'filter':''}), 'text']) def cache(self, irc, msg, args, url):