Added check for duplicate module loading in load command

This commit is contained in:
Jeremy Fincher 2003-04-02 07:09:43 +00:00
parent f82170de74
commit 7e8aab6619
1 changed files with 3 additions and 0 deletions

View File

@ -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: