Progress on modpython global hooks.
OnModuleLoading, OnModuleUnloading, OnGetModInfo work fine. Need to add: OnClientCapLs, OnGetAvailableMods, OnLoginAttempt See #98
This commit is contained in:
1 parent
5b50003f33
commit
5656e14aa2
6 files changed
+62
-6
No files matched your search
@@ -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():
|
||||
|
||||
Reference in new issue
Block a user