mirror of
https://github.com/Mikaela/Limnoria.git
synced 2025-02-06 01:24:05 +01:00
Loaded plugins during __init__ rather than do001.
This commit is contained in:
parent
27656e5fef
commit
603cab6b0a
@ -203,10 +203,11 @@ class Owner(callbacks.Plugin):
|
||||
if irc != newIrc:
|
||||
newIrc.state.history = irc.state.history
|
||||
driver = drivers.newDriver(newIrc)
|
||||
self._loadPlugins(newIrc)
|
||||
return newIrc
|
||||
|
||||
def do001(self, irc, msg):
|
||||
self.log.info('Loading plugins (connected to %s).', irc.network)
|
||||
def _loadPlugins(self, irc):
|
||||
self.log.info('Loading plugins (connecting to %s).', irc.network)
|
||||
alwaysLoadImportant = conf.supybot.plugins.alwaysLoadImportant()
|
||||
important = conf.supybot.commands.defaultPlugins.importantPlugins()
|
||||
for (name, value) in conf.supybot.plugins.getValues(fullNames=False):
|
||||
|
@ -328,7 +328,7 @@ if __name__ == '__main__':
|
||||
import supybot.plugins.Owner as Owner
|
||||
|
||||
owner = Owner.Class()
|
||||
irclib._callbacks.append(owner)
|
||||
#irclib._callbacks.append(owner)
|
||||
|
||||
if options.profile:
|
||||
import profile
|
||||
|
@ -82,7 +82,8 @@ class IrcCallback(IrcCommandDispatcher):
|
||||
super(IrcCallback, self).__init__(*args, **kwargs)
|
||||
|
||||
def __repr__(self):
|
||||
return '<%s %s>' % (self.__class__.__name__, self.name())
|
||||
return '<%s %s %s>' % \
|
||||
(self.__class__.__name__, self.name(), object.__repr__(self))
|
||||
|
||||
def name(self):
|
||||
"""Returns the name of the callback."""
|
||||
|
Loading…
Reference in New Issue
Block a user