mirror of
https://github.com/Mikaela/Limnoria.git
synced 2024-11-02 17:29:22 +01:00
Update configure() and configurable default states so that the default for
snarfers is off and all users are asked whether they would like to enable the snarfer
This commit is contained in:
parent
f6e848511b
commit
31c05776c6
@ -69,30 +69,29 @@ def configure(onStart, afterConnect, advanced):
|
|||||||
if key:
|
if key:
|
||||||
onStart.append('load Google')
|
onStart.append('load Google')
|
||||||
onStart.append('google licensekey %s' % key)
|
onStart.append('google licensekey %s' % key)
|
||||||
|
print 'The Google plugin has the functionality to watch for URLs'
|
||||||
|
print 'that match a specific pattern (we call this a snarfer).'
|
||||||
|
print 'When supybot sees such a URL, he will parse the web page'
|
||||||
|
print 'for information and reply with the results.\n'
|
||||||
|
print 'Google has two available snarfers: Google Groups link'
|
||||||
|
print 'snarfing and a google search snarfer.\n'
|
||||||
|
if yn('Do you want the Google Groups link snarfer enabled by '
|
||||||
|
'default?') == 'n':
|
||||||
|
onStart.append('Google config groups-snarfer off')
|
||||||
|
if yn('Do you want the Google search snarfer enabled by default?')\
|
||||||
|
== 'y':
|
||||||
|
onStart.append('Google config search-snarfer on')
|
||||||
if 'load Alias' not in onStart:
|
if 'load Alias' not in onStart:
|
||||||
print 'Google depends on the Alias module for some commands.'
|
print 'Google depends on the Alias module for some extra commands.'
|
||||||
if yn('Would you like to load the Alias module now?') == 'y':
|
if yn('Would you like to load the Alias module now?') == 'y':
|
||||||
onStart.append('load Alias')
|
onStart.append('load Alias')
|
||||||
else:
|
else:
|
||||||
print 'You can still use the Google module, but you won\'t ' \
|
print 'You can still use the Google module, but you won\'t '\
|
||||||
'be asked any further questions.'
|
'have these extra commands enabled.'
|
||||||
return
|
return
|
||||||
onStart.append('alias googlelinux "google --restrict=linux $1"')
|
onStart.append('alias googlelinux "google --restrict=linux $1"')
|
||||||
onStart.append('alias googlebsd "google --restrict=bsd $1"')
|
onStart.append('alias googlebsd "google --restrict=bsd $1"')
|
||||||
onStart.append('alias googlemac "google --restrict=mac $1"')
|
onStart.append('alias googlemac "google --restrict=mac $1"')
|
||||||
if advanced:
|
|
||||||
print 'The Google plugin has the functionality to watch for URLs'
|
|
||||||
print 'that match a specific pattern (we call this a snarfer).'
|
|
||||||
print 'When supybot sees such a URL, he will parse the web page'
|
|
||||||
print 'for information and reply with the results.\n'
|
|
||||||
print 'Google has two available snarfers: Google Groups link'
|
|
||||||
print 'snarfing and a google search snarfer.\n'
|
|
||||||
if yn('Do you want the Google Groups link snarfer enabled by '\
|
|
||||||
'default?') == 'n':
|
|
||||||
onStart.append('Google config groups-snarfer off')
|
|
||||||
if yn('Do you want the Google search snarfer enabled by default?')\
|
|
||||||
== 'y':
|
|
||||||
onStart.append('Google config search-snarfer on')
|
|
||||||
else:
|
else:
|
||||||
print 'You\'ll need to get a key before you can use this plugin.'
|
print 'You\'ll need to get a key before you can use this plugin.'
|
||||||
print 'You can apply for a key at http://www.google.com/apis/'
|
print 'You can apply for a key at http://www.google.com/apis/'
|
||||||
|
Loading…
Reference in New Issue
Block a user