From 285ac5ef6d88a9c8685e0b7e517c9a87c7dc547c Mon Sep 17 00:00:00 2001 From: Jeremy Fincher Date: Wed, 4 Feb 2004 05:56:51 +0000 Subject: [PATCH] At least import the plugin module, so configuration is preserved. --- src/Owner.py | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) diff --git a/src/Owner.py b/src/Owner.py index a1ae8510e..071eac92d 100644 --- a/src/Owner.py +++ b/src/Owner.py @@ -140,14 +140,18 @@ class Owner(privmsgs.CapabilityCheckingPrivmsg): loadPluginClass(irc, m) self.log.info('Loading plugins/ plugins.') for (name, value) in conf.supybot.plugins.getValues(fullNames=False): - if value() and irc.getCallback(name) is None: - if not irc.getCallback(name): - self.log.info('Loading %s.' % name) - try: - m = loadPluginModule(name) - loadPluginClass(irc, m) - except Exception, e: - log.exception('Failed to load %s:' % name) + if irc.getCallback(name) is None: + if value(): + if not irc.getCallback(name): + self.log.info('Loading %s.' % name) + try: + m = loadPluginModule(name) + loadPluginClass(irc, m) + except Exception, e: + log.exception('Failed to load %s:' % name) + else: + # Let's import the module so configuration is preserved. + _ = loadPluginModule(name) def disambiguate(self, irc, tokens, ambiguousCommands=None): """Disambiguates the given tokens based on the plugins loaded and