mirror of
https://github.com/Mikaela/Limnoria.git
synced 2024-11-02 17:29:22 +01:00
Fixed bug in load and removed Sorry.
This commit is contained in:
parent
99cb3579a6
commit
b21071c382
@ -290,12 +290,12 @@ class OwnerCommands(CapabilityCheckingPrivmsg):
|
|||||||
"""
|
"""
|
||||||
name = getArgs(args)
|
name = getArgs(args)
|
||||||
if name in [cb.name() for cb in irc.callbacks]:
|
if name in [cb.name() for cb in irc.callbacks]:
|
||||||
irc.error('Sorry, that module is already loaded.')
|
irc.error(msg, 'That module is already loaded.')
|
||||||
return
|
return
|
||||||
try:
|
try:
|
||||||
moduleInfo = imp.find_module(name)
|
moduleInfo = imp.find_module(name)
|
||||||
except ImportError:
|
except ImportError:
|
||||||
irc.error(msg, 'Sorry, no plugin %s exists.' % name)
|
irc.error(msg, 'No plugin %s exists.' % name)
|
||||||
return
|
return
|
||||||
module = imp.load_module(name, *moduleInfo)
|
module = imp.load_module(name, *moduleInfo)
|
||||||
callback = module.Class()
|
callback = module.Class()
|
||||||
@ -316,7 +316,7 @@ class OwnerCommands(CapabilityCheckingPrivmsg):
|
|||||||
try:
|
try:
|
||||||
moduleInfo = imp.find_module(name)
|
moduleInfo = imp.find_module(name)
|
||||||
except ImportError:
|
except ImportError:
|
||||||
irc.error(msg, 'Sorry, no plugin %s exists.' % name)
|
irc.error(msg, 'No plugin %s exists.' % name)
|
||||||
return
|
return
|
||||||
module = imp.load_module(name, *moduleInfo)
|
module = imp.load_module(name, *moduleInfo)
|
||||||
callback = module.Class()
|
callback = module.Class()
|
||||||
|
Loading…
Reference in New Issue
Block a user