mirror of
https://github.com/znc/znc.git
synced 2026-05-06 13:32:36 +02:00
Progress on modpython global hooks.
OnModuleLoading, OnModuleUnloading, OnGetModInfo work fine. Need to add: OnClientCapLs, OnGetAvailableMods, OnLoginAttempt See #98
This commit is contained in:
@@ -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