mirror of
https://github.com/jlu5/PyLink.git
synced 2025-01-24 03:04:05 +01:00
coreplugin: log plugin loading/unloading to INFO
This commit is contained in:
parent
59af8e196c
commit
7b444a72d8
@ -173,6 +173,7 @@ def load(irc, source, args):
|
|||||||
if name in world.plugins:
|
if name in world.plugins:
|
||||||
irc.reply("Error: %r is already loaded." % name)
|
irc.reply("Error: %r is already loaded." % name)
|
||||||
return
|
return
|
||||||
|
log.info('(%s) Loading plugin %r for %s', irc.name, name, utils.getHostmask(irc, source))
|
||||||
try:
|
try:
|
||||||
world.plugins[name] = pl = utils.loadModuleFromFolder(name, world.plugins_folder)
|
world.plugins[name] = pl = utils.loadModuleFromFolder(name, world.plugins_folder)
|
||||||
except ImportError as e:
|
except ImportError as e:
|
||||||
@ -199,6 +200,7 @@ def unload(irc, source, args):
|
|||||||
irc.reply("Error: Not enough arguments. Needs 1: plugin name.")
|
irc.reply("Error: Not enough arguments. Needs 1: plugin name.")
|
||||||
return
|
return
|
||||||
if name in world.plugins:
|
if name in world.plugins:
|
||||||
|
log.info('(%s) Unloading plugin %r for %s', irc.name, name, utils.getHostmask(irc, source))
|
||||||
pl = world.plugins[name]
|
pl = world.plugins[name]
|
||||||
log.debug('sys.getrefcount of plugin %s is %s', pl, sys.getrefcount(pl))
|
log.debug('sys.getrefcount of plugin %s is %s', pl, sys.getrefcount(pl))
|
||||||
# Remove any command functions set by the plugin.
|
# Remove any command functions set by the plugin.
|
||||||
|
Loading…
Reference in New Issue
Block a user