diff --git a/url.py b/url.py index 1b9c7c56d5..7d04aef426 100644 --- a/url.py +++ b/url.py @@ -41,8 +41,12 @@ def configure(config): 'Prefix to suppress URL titling', '!') -def setup(bot): +def setup(bot=None): global url_finder, exclusion_char + + if not bot: + return + if bot.config.has_option('url', 'exclude'): regexes = [re.compile(s) for s in bot.config.url.get_list(bot.config.exclude)]