mirror of
https://github.com/Mikaela/Limnoria.git
synced 2024-11-07 19:49:23 +01:00
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)
|
name = getArgs(args)
|
||||||
callbacks = irc.removeCallback(name)
|
callbacks = irc.removeCallback(name)
|
||||||
if callbacks:
|
if callbacks:
|
||||||
|
for callback in callbacks:
|
||||||
|
callback.die()
|
||||||
try:
|
try:
|
||||||
moduleInfo = imp.find_module(name)
|
moduleInfo = imp.find_module(name)
|
||||||
module = imp.load_module(name, *moduleInfo)
|
module = imp.load_module(name, *moduleInfo)
|
||||||
callback = module.Class()
|
callback = module.Class()
|
||||||
irc.addCallback(callback)
|
irc.addCallback(callback)
|
||||||
for callback in callbacks:
|
|
||||||
callback.die()
|
|
||||||
irc.reply(msg, conf.replySuccess)
|
irc.reply(msg, conf.replySuccess)
|
||||||
except ImportError:
|
except ImportError:
|
||||||
for callback in callbacks:
|
for callback in callbacks:
|
||||||
|
Loading…
Reference in New Issue
Block a user