From 17c569ba2c3da8f4ef3d5493ca585ec65fdb7833 Mon Sep 17 00:00:00 2001 From: Jeremy Fincher Date: Sun, 22 Aug 2004 06:41:22 +0000 Subject: [PATCH] Let's have an extra hoop for people who don't want to load the src/ plugins to jump through. --- src/Owner.py | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/src/Owner.py b/src/Owner.py index 38c52fc08..1a158a5b1 100644 --- a/src/Owner.py +++ b/src/Owner.py @@ -217,11 +217,20 @@ class Owner(privmsgs.CapabilityCheckingPrivmsg): def do001(self, irc, msg): self.log.info('Loading plugins.') + alwaysLoadSrcPlugins = conf.supybot.plugins.alwaysLoadDefault() for (name, value) in conf.supybot.plugins.getValues(fullNames=False): - if name.lower() == 'owner': - continue # Just in case. + if name.lower() in ('owner', 'alwaysloaddefault'): + continue if irc.getCallback(name) is None: - if value(): + load = value() + if not load and name in self._srcPlugins: + if alwaysLoadSrcPlugins: + s = '%s is configured not to be loaded, but is being '\ + 'loaded anyway because ' \ + 'supybot.plugins.alwaysLoadDefault is True.' + self.log.warning(s, name) + load = True + if load: if not irc.getCallback(name): # This is debug because each log logs its beginning. self.log.debug('Loading %s.' % name)