diff --git a/bot.py b/bot.py index 7cfc76c..e71aa96 100755 --- a/bot.py +++ b/bot.py @@ -40,7 +40,6 @@ class Phenny(irc.Bot): else: for fn in self.config.enable: filenames.append(os.path.join(home, 'modules', fn + '.py')) - # @@ exclude if hasattr(self.config, 'extra'): for fn in self.config.extra: @@ -52,8 +51,10 @@ class Phenny(irc.Bot): filenames.append(os.path.join(fn, n)) modules = [] + excluded_modules = getattr(self.config, 'exclude', []) for filename in filenames: name = os.path.basename(filename)[:-3] + if name in excluded_modules: continue try: module = imp.load_source(name, filename) except Exception, e: print >> sys.stderr, "Error loading %s: %s (in bot.py)" % (name, e) diff --git a/modules/reload.py b/modules/reload.py index 50e1a56..32e6796 100755 --- a/modules/reload.py +++ b/modules/reload.py @@ -47,6 +47,7 @@ def f_reload(phenny, input): f_reload.name = 'reload' f_reload.rule = ('$nick', ['reload'], r'(\S+)?') f_reload.priority = 'low' +f_reload.thread = False if __name__ == '__main__': print __doc__.strip() diff --git a/modules/search.py b/modules/search.py index 7a0e3ad..1067531 100755 --- a/modules/search.py +++ b/modules/search.py @@ -86,5 +86,31 @@ def gcs(phenny, input): phenny.say(reply) gcs.commands = ['gcs', 'comp'] +r_bing = re.compile(r'