mirror of
https://github.com/Mikaela/Limnoria.git
synced 2024-11-02 17:29:22 +01:00
Added check for duplicate module loading in load command
This commit is contained in:
parent
f82170de74
commit
7e8aab6619
@ -289,6 +289,9 @@ class OwnerCommands(CapabilityCheckingPrivmsg):
|
|||||||
Loads the plugin <plugin> from the plugins/ directory.
|
Loads the plugin <plugin> from the plugins/ directory.
|
||||||
"""
|
"""
|
||||||
name = getArgs(args)
|
name = getArgs(args)
|
||||||
|
if name in [cb.name() for cb in irc.callbacks]:
|
||||||
|
irc.error('Sorry, that module is already loaded.')
|
||||||
|
return
|
||||||
try:
|
try:
|
||||||
moduleInfo = imp.find_module(name)
|
moduleInfo = imp.find_module(name)
|
||||||
except ImportError:
|
except ImportError:
|
||||||
|
Loading…
Reference in New Issue
Block a user