Added a classModule attribute to plugins to have easy access to it (the new plugin format made that significantly harder for us; this is an easy workaround).

This commit is contained in:
Jeremy Fincher 2005-02-18 06:14:17 +00:00
parent ed0b91c3df
commit 2a75f4b83d
2 changed files with 2 additions and 0 deletions

View File

@ -1068,6 +1068,7 @@ class PluginMixin(irclib.IrcCallback):
alwaysCall = () alwaysCall = ()
threaded = False threaded = False
noIgnore = False noIgnore = False
classModule = None
Proxy = IrcObjectProxy Proxy = IrcObjectProxy
def __init__(self, irc): def __init__(self, irc):
self.__parent = super(PluginMixin, self) self.__parent = super(PluginMixin, self)

View File

@ -94,6 +94,7 @@ def loadPluginClass(irc, module, register=None):
'a bug with us about this error.' 'a bug with us about this error.'
else: else:
raise raise
cb.classModule = module
plugin = cb.name() plugin = cb.name()
public = True public = True
if hasattr(cb, 'public'): if hasattr(cb, 'public'):