mirror of
https://github.com/Mikaela/Limnoria.git
synced 2024-11-27 13:19:24 +01:00
Let's make sure we unregister configuration-wise before we check to see if the plugin isn't loaded.
This commit is contained in:
parent
cc4b76a8f3
commit
d26b311fef
@ -552,13 +552,15 @@ class Owner(privmsgs.CapabilityCheckingPrivmsg):
|
|||||||
if ircutils.strEqual(name, self.name()):
|
if ircutils.strEqual(name, self.name()):
|
||||||
irc.error('You can\'t unload the %s plugin.' % name)
|
irc.error('You can\'t unload the %s plugin.' % name)
|
||||||
return
|
return
|
||||||
|
# Let's do this so even if the plugin isn't currently loaded, it doesn't
|
||||||
|
# stay attempting to load.
|
||||||
|
conf.registerPlugin(name, False)
|
||||||
callbacks = irc.removeCallback(name)
|
callbacks = irc.removeCallback(name)
|
||||||
if callbacks:
|
if callbacks:
|
||||||
for callback in callbacks:
|
for callback in callbacks:
|
||||||
callback.die()
|
callback.die()
|
||||||
del callback
|
del callback
|
||||||
gc.collect()
|
gc.collect()
|
||||||
conf.registerPlugin(name, False)
|
|
||||||
irc.replySuccess()
|
irc.replySuccess()
|
||||||
else:
|
else:
|
||||||
irc.error('There was no plugin %s.' % name)
|
irc.error('There was no plugin %s.' % name)
|
||||||
|
Loading…
Reference in New Issue
Block a user