Progress on modpython global hooks.

OnModuleLoading, OnModuleUnloading, OnGetModInfo work fine.
Need to add: OnClientCapLs, OnGetAvailableMods, OnLoginAttempt

See #98
This commit is contained in:
Alexey Sokolov
2012-07-22 18:21:58 +07:00
parent 5b50003f33
commit 5656e14aa2
6 changed files with 62 additions and 6 deletions

View File

@@ -549,6 +549,8 @@ def load_module(modname, args, module_type, user, network, retmsg, modpython):
def unload_module(module):
if (module not in _py_modules):
return False
module.OnShutdown()
_py_modules.discard(module)
cmod = module._cmod
@@ -561,6 +563,7 @@ def unload_module(module):
del module._cmod
cmod.DeletePyModule()
del cmod
return True
def unload_all():