3
0
mirror of https://github.com/jlu5/PyLink.git synced 2024-11-27 21:19:31 +01:00

corecommands: use utils.PLUGIN_PREFIX in 'unload'

This commit is contained in:
James Lu 2017-03-25 14:08:23 -07:00
parent 36f9bef450
commit f497044777

View File

@ -2,9 +2,6 @@
corecommands.py - Implements core PyLink commands.
"""
# Get the package name that plugins are stored under.
plugin_root = __name__.split('.')[0] + '.plugins.'
import gc
import sys
import importlib
@ -119,7 +116,7 @@ def unload(irc, source, args):
# Since we're using absolute imports in 0.9.x+, the module name differs from the actual plugin
# name.
modulename = plugin_root + name
modulename = utils.PLUGIN_PREFIX + name
if name in world.plugins:
log.info('(%s) Unloading plugin %r for %s', irc.name, name, irc.getHostmask(source))