From 8cc8bba9e04155d61c276f247483e4124fdc0962 Mon Sep 17 00:00:00 2001 From: Jeremy Fincher Date: Wed, 21 Jan 2004 19:13:20 +0000 Subject: [PATCH] Made do001 handle already-loaded plugins (like, uh, right after reconnecting...) --- src/Owner.py | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/Owner.py b/src/Owner.py index 5652e3020..b9b7c3b8e 100644 --- a/src/Owner.py +++ b/src/Owner.py @@ -120,11 +120,13 @@ class Owner(privmsgs.CapabilityCheckingPrivmsg): def do001(self, irc, msg): self.log.info('Loading other src/ plugins.') for s in ('Admin', 'Channel', 'Config', 'Misc', 'User'): - self.log.info('Loading %s.' % s) - m = loadPluginModule(s) - loadPluginClass(irc, m) + if irc.getCallback(s) is None: + self.log.info('Loading %s.' % s) + m = loadPluginModule(s) + loadPluginClass(irc, m) + self.log.info('Loading plugins/ plugins.') for (name, value) in conf.supybot.plugins.getValues(): - if value(): + if value() and irc.getCallback(name) is None: s = rsplit(name, '.', 1)[-1] if not irc.getCallback(s): self.log.info('Loading %s.' % s)