Added a little del to the reload/unload stuff

This commit is contained in:
Jeremy Fincher 2003-08-15 05:39:35 +00:00
parent 977031163e
commit 1d9f7f331c

View File

@ -31,6 +31,7 @@
from fix import * from fix import *
import gc
import os import os
import sys import sys
import imp import imp
@ -291,6 +292,8 @@ class OwnerCommands(CapabilityCheckingPrivmsg):
if callbacks: if callbacks:
for callback in callbacks: for callback in callbacks:
callback.die() callback.die()
del callback
gc.collect()
try: try:
moduleInfo = imp.find_module(name) moduleInfo = imp.find_module(name)
module = imp.load_module(name, *moduleInfo) module = imp.load_module(name, *moduleInfo)
@ -316,6 +319,8 @@ class OwnerCommands(CapabilityCheckingPrivmsg):
if callbacks: if callbacks:
for callback in callbacks: for callback in callbacks:
callback.die() callback.die()
del callback
gc.collect()
irc.reply(msg, conf.replySuccess) irc.reply(msg, conf.replySuccess)
else: else:
irc.error(msg, 'There was no callback %s' % name) irc.error(msg, 'There was no callback %s' % name)