if we add the module to the autoload list on a load, we should remove it on unload

This commit is contained in:
Brian S. Stephan 2011-01-06 23:29:51 -06:00
parent a3d30daacb
commit 8bbda8b575
1 changed files with 5 additions and 0 deletions

View File

@ -209,6 +209,11 @@ class IrcAdmin(Module):
del(sys.modules[modstr])
del(module)
# might as well remove it from the list
modset = set(self.config.get('dr.botzo', 'module_list').split(','))
modset.remove(modname)
self.config.set('dr.botzo', 'module_list', ','.join(modset))
return self.reply(connection, replypath, 'Module ' + modname + ' unloaded.')
# guess it was never loaded