mirror of
https://github.com/jlu5/PyLink.git
synced 2024-11-01 01:09:22 +01:00
commands: only allow loading plugins that aren't already loaded
This commit is contained in:
parent
38a350a5f8
commit
5aeaac0394
@ -216,6 +216,9 @@ def load(irc, source, args):
|
||||
except IndexError:
|
||||
irc.msg(irc.called_by, "Error: Not enough arguments. Needs 1: plugin name.")
|
||||
return
|
||||
if name in world.plugins:
|
||||
irc.msg(irc.called_by, "Error: %r is already loaded." % name)
|
||||
return
|
||||
try:
|
||||
world.plugins[name] = pl = __import__(name)
|
||||
except ImportError as e:
|
||||
|
Loading…
Reference in New Issue
Block a user