mirror of https://github.com/Mikaela/Limnoria.git
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.
|
||||
"""
|
||||
name = getArgs(args)
|
||||
if name in [cb.name() for cb in irc.callbacks]:
|
||||
irc.error('Sorry, that module is already loaded.')
|
||||
return
|
||||
try:
|
||||
moduleInfo = imp.find_module(name)
|
||||
except ImportError:
|
||||
|
|
Loading…
Reference in New Issue