mirror of
https://github.com/jlu5/PyLink.git
synced 2025-02-25 09:50:39 +01:00
corecommands: use utils.PLUGIN_PREFIX in 'unload'
This commit is contained in:
parent
36f9bef450
commit
f497044777
@ -2,9 +2,6 @@
|
|||||||
corecommands.py - Implements core PyLink commands.
|
corecommands.py - Implements core PyLink commands.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
# Get the package name that plugins are stored under.
|
|
||||||
plugin_root = __name__.split('.')[0] + '.plugins.'
|
|
||||||
|
|
||||||
import gc
|
import gc
|
||||||
import sys
|
import sys
|
||||||
import importlib
|
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
|
# Since we're using absolute imports in 0.9.x+, the module name differs from the actual plugin
|
||||||
# name.
|
# name.
|
||||||
modulename = plugin_root + name
|
modulename = utils.PLUGIN_PREFIX + name
|
||||||
|
|
||||||
if name in world.plugins:
|
if name in world.plugins:
|
||||||
log.info('(%s) Unloading plugin %r for %s', irc.name, name, irc.getHostmask(source))
|
log.info('(%s) Unloading plugin %r for %s', irc.name, name, irc.getHostmask(source))
|
||||||
|
Loading…
x
Reference in New Issue
Block a user