Made do001 handle already-loaded plugins (like, uh, right after reconnecting...)

This commit is contained in:
Jeremy Fincher 2004-01-21 19:13:20 +00:00
parent fea97c96b5
commit 8cc8bba9e0

View File

@ -120,11 +120,13 @@ class Owner(privmsgs.CapabilityCheckingPrivmsg):
def do001(self, irc, msg): def do001(self, irc, msg):
self.log.info('Loading other src/ plugins.') self.log.info('Loading other src/ plugins.')
for s in ('Admin', 'Channel', 'Config', 'Misc', 'User'): for s in ('Admin', 'Channel', 'Config', 'Misc', 'User'):
if irc.getCallback(s) is None:
self.log.info('Loading %s.' % s) self.log.info('Loading %s.' % s)
m = loadPluginModule(s) m = loadPluginModule(s)
loadPluginClass(irc, m) loadPluginClass(irc, m)
self.log.info('Loading plugins/ plugins.')
for (name, value) in conf.supybot.plugins.getValues(): for (name, value) in conf.supybot.plugins.getValues():
if value(): if value() and irc.getCallback(name) is None:
s = rsplit(name, '.', 1)[-1] s = rsplit(name, '.', 1)[-1]
if not irc.getCallback(s): if not irc.getCallback(s):
self.log.info('Loading %s.' % s) self.log.info('Loading %s.' % s)