diff --git a/plugins/Bugzilla.py b/plugins/Bugzilla.py index 20a65f5ea..3d1bcf357 100644 --- a/plugins/Bugzilla.py +++ b/plugins/Bugzilla.py @@ -72,13 +72,12 @@ class BugzillaError(Exception): def configure(onStart, afterConnect, advanced): from questions import expect, anything, yn onStart.append('load Bugzilla') - if advanced: - print 'The Bugzilla plugin has the functionality to watch for URLs' - print 'that match a specific pattern (we call this a snarfer). When' - print 'supybot sees such a URL, he will parse the web page for' - print 'information and reply with the results.\n' - if yn('Do you want the Bugzilla snarfer enabled by default?') == 'n': - onStart.append('Bugzilla config bug-snarfer off') + print 'The Bugzilla plugin has the functionality to watch for URLs' + print 'that match a specific pattern (we call this a snarfer). When' + print 'supybot sees such a URL, he will parse the web page for' + print 'information and reply with the results.\n' + if yn('Do you want this bug snarfer enabled by default?') == 'y': + onStart.append('Bugzilla config bug-snarfer on') replyNoBugzilla = 'I don\'t have a bugzilla %r' @@ -87,7 +86,7 @@ class Bugzilla(callbacks.PrivmsgCommandAndRegexp, plugins.Configurable): threaded = True regexps = ['bzSnarfer'] configurables = plugins.ConfigurableDictionary( - [('bug-snarfer', plugins.ConfigurableBoolType, True, + [('bug-snarfer', plugins.ConfigurableBoolType, False, """Determines whether the bug snarfer will be enabled, such that any Bugzilla URLs seen in the channel will have their information reported into the channel.""")] diff --git a/plugins/Ebay.py b/plugins/Ebay.py index ca0106f68..1da5c526d 100644 --- a/plugins/Ebay.py +++ b/plugins/Ebay.py @@ -61,8 +61,8 @@ def configure(onStart, afterConnect, advanced): print 'that match a specific pattern (we call this a snarfer). When' print 'supybot sees such a URL, he will parse the web page for' print 'information and reply with the results.\n' - if yn('Do you want the Ebay snarfer enabled by default?') == 'n': - onStart.append('Ebay config auction-snarfer off') + if yn('Do you want the Ebay snarfer enabled by default?') == 'y': + onStart.append('Ebay config auction-snarfer on') class EbayError(callbacks.Error): pass @@ -75,7 +75,7 @@ class Ebay(callbacks.PrivmsgCommandAndRegexp, plugins.Configurable): threaded = True regexps = ['ebaySnarfer'] configurables = plugins.ConfigurableDictionary( - [('auction-snarfer', plugins.ConfigurableBoolType, True, + [('auction-snarfer', plugins.ConfigurableBoolType, False, """Determines whether the bot will automatically 'snarf' Ebay auction URLs and print information about them.""")] ) diff --git a/plugins/Google.py b/plugins/Google.py index 4b88d187a..b1226e5e2 100644 --- a/plugins/Google.py +++ b/plugins/Google.py @@ -72,12 +72,14 @@ def configure(onStart, afterConnect, 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 'for information and reply with the results.' + print print 'Google has two available snarfers: Google Groups link' - print 'snarfing and a google search snarfer.\n' + print 'snarfing and a google search snarfer.' + print if yn('Do you want the Google Groups link snarfer enabled by ' - 'default?') == 'n': - onStart.append('Google config groups-snarfer off') + 'default?') == 'y': + onStart.append('Google config groups-snarfer on') if yn('Do you want the Google search snarfer enabled by default?')\ == 'y': onStart.append('Google config search-snarfer on') @@ -122,7 +124,7 @@ class Google(callbacks.PrivmsgCommandAndRegexp, plugins.Configurable): threaded = True regexps = sets.Set(['googleSnarfer', 'googleGroups']) configurables = plugins.ConfigurableDictionary( - [('groups-snarfer', plugins.ConfigurableBoolType, True, + [('groups-snarfer', plugins.ConfigurableBoolType, False, """Determines whether the groups snarfer is enabled. If so, URLs at groups.google.com will be snarfed and their group/title messaged to the channel."""), diff --git a/plugins/Python.py b/plugins/Python.py index 2c164dfc4..458bfbccc 100644 --- a/plugins/Python.py +++ b/plugins/Python.py @@ -69,12 +69,16 @@ def configure(onStart, afterConnect, advanced): # commands you would like to be run when the bot has finished connecting. from questions import expect, anything, something, yn onStart.append('load Python') + if yn("""This plugin provides a snarfer for ASPN Python Recipe URLs; + it will output the name of the Recipe when it sees such a URL. + Would you like to enable this snarfer?""") == 'y': + onStart.append('python config aspn-snarfer on') class Python(callbacks.PrivmsgCommandAndRegexp, plugins.Configurable): modulechars = '%s%s%s' % (string.ascii_letters, string.digits, '_.') regexps = ['aspnRecipes'] configurables = plugins.ConfigurableDictionary( - [('aspn-snarfer', plugins.ConfigurableBoolType, True, + [('aspn-snarfer', plugins.ConfigurableBoolType, False, """Determines whether the ASPN Python recipe snarfer is enabled. If so, it will message the channel with the name of the recipe when it sees an ASPN Python recipe link on the channel.""")] diff --git a/plugins/URL.py b/plugins/URL.py index c722f02e7..0cf40e7bb 100644 --- a/plugins/URL.py +++ b/plugins/URL.py @@ -61,13 +61,31 @@ def configure(onStart, afterConnect, advanced): # commands you would like to be run when the bot has finished connecting. from questions import expect, anything, something, yn onStart.append('load URL') + if yn("""This plugin offers a snarfer that will go to tinyurl.com and get + a shorter version of long URLs that are sent to the channel. + Would you like this snarfer to be enabled?""") == 'y': + onStart.append('url config tinyurl-snarfer on') + if advanced: + x = anything("""What would you like to be the minimum URL length + that will trigger this snarfer?""") + if not x: + x = '46' + while True: + try: + i = int(x) + onStart.append('url config tinyurl-minimum-length %s' % i) + return + except ValueError: + print 'That\'s not a valid integer.' + x = anything("""What would you like to be the minimum URL + length that will trigger this snarfer?""") class URL(callbacks.PrivmsgCommandAndRegexp, plugins.Configurable, plugins.ChannelDBHandler): regexps = ['tinyurlSnarfer'] configurables = plugins.ConfigurableDictionary( - [('tinyurl-snarfer', plugins.ConfigurableBoolType, True, + [('tinyurl-snarfer', plugins.ConfigurableBoolType, False, """Determines whether the bot will output shorter versions of URLs longer than the tinyurl-minimum-length config variable."""), ('tinyurl-minimum-length', plugins.ConfigurableIntType, 46,