mirror of https://github.com/Mikaela/Limnoria.git
Made the old callbacks die before the new callbacks are loaded.
This commit is contained in:
parent
6d40bb475e
commit
622f96c8d4
|
@ -279,13 +279,13 @@ class OwnerCommands(CapabilityCheckingPrivmsg):
|
|||
name = getArgs(args)
|
||||
callbacks = irc.removeCallback(name)
|
||||
if callbacks:
|
||||
for callback in callbacks:
|
||||
callback.die()
|
||||
try:
|
||||
moduleInfo = imp.find_module(name)
|
||||
module = imp.load_module(name, *moduleInfo)
|
||||
callback = module.Class()
|
||||
irc.addCallback(callback)
|
||||
for callback in callbacks:
|
||||
callback.die()
|
||||
irc.reply(msg, conf.replySuccess)
|
||||
except ImportError:
|
||||
for callback in callbacks:
|
||||
|
|
Loading…
Reference in New Issue