diff --git a/modules/modperl/functions.in b/modules/modperl/functions.in index d03c03ff..80026091 100644 --- a/modules/modperl/functions.in +++ b/modules/modperl/functions.in @@ -60,4 +60,6 @@ bool OnServerCapAvailable(const CString& sCap)=false void OnServerCapResult(const CString& sCap, bool bSuccess) EModRet OnTimerAutoJoin(CChan& Channel) bool OnEmbeddedWebRequest(CWebSock& WebSock, const CString& sPageName, CTemplate& Tmpl)=false +EModRet OnAddNetwork(CIRCNetwork& Network, CString& sErrorRet) +EModRet OnDeleteNetwork(CIRCNetwork& Network) diff --git a/modules/modperl/module.h b/modules/modperl/module.h index 2f586d09..cdf93f89 100644 --- a/modules/modperl/module.h +++ b/modules/modperl/module.h @@ -99,7 +99,9 @@ public: virtual bool OnServerCapAvailable(const CString& sCap); virtual void OnServerCapResult(const CString& sCap, bool bSuccess); virtual EModRet OnTimerAutoJoin(CChan& Channel); - bool OnEmbeddedWebRequest(CWebSock&, const CString&, CTemplate&); + virtual bool OnEmbeddedWebRequest(CWebSock&, const CString&, CTemplate&); + virtual EModRet OnAddNetwork(CIRCNetwork& Network, CString& sErrorRet); + virtual EModRet OnDeleteNetwork(CIRCNetwork& Network); }; static inline CPerlModule* AsPerlModule(CModule* p) { diff --git a/modules/modperl/startup.pl b/modules/modperl/startup.pl index 4c58af0d..c66e7b6f 100644 --- a/modules/modperl/startup.pl +++ b/modules/modperl/startup.pl @@ -369,6 +369,8 @@ sub OnServerCapAvailable {} sub OnServerCapResult {} sub OnTimerAutoJoin {} sub OnEmbeddedWebRequest {} +sub OnAddNetwork {} +sub OnDeleteNetwork {} # Functions of CModule will be usable from perl modules. diff --git a/modules/modpython/functions.in b/modules/modpython/functions.in index 91b5defb..9b45225f 100644 --- a/modules/modpython/functions.in +++ b/modules/modpython/functions.in @@ -60,6 +60,8 @@ bool OnServerCapAvailable(const CString& sCap)=false void OnServerCapResult(const CString& sCap, bool bSuccess) EModRet OnTimerAutoJoin(CChan& Channel) bool OnEmbeddedWebRequest(CWebSock& WebSock, const CString& sPageName, CTemplate& Tmpl)=false +EModRet OnAddNetwork(CIRCNetwork& Network, CString& sErrorRet) +EModRet OnDeleteNetwork(CIRCNetwork& Network) EModRet OnAddUser(CUser& User, CString& sErrorRet) EModRet OnDeleteUser(CUser& User) diff --git a/modules/modpython/module.h b/modules/modpython/module.h index 52e2eb1e..173627b2 100644 --- a/modules/modpython/module.h +++ b/modules/modpython/module.h @@ -115,7 +115,9 @@ public: virtual bool OnServerCapAvailable(const CString& sCap); virtual void OnServerCapResult(const CString& sCap, bool bSuccess); virtual EModRet OnTimerAutoJoin(CChan& Channel); - bool OnEmbeddedWebRequest(CWebSock&, const CString&, CTemplate&); + virtual bool OnEmbeddedWebRequest(CWebSock&, const CString&, CTemplate&); + virtual EModRet OnAddNetwork(CIRCNetwork& Network, CString& sErrorRet); + virtual EModRet OnDeleteNetwork(CIRCNetwork& Network); // Global Modules virtual EModRet OnAddUser(CUser& User, CString& sErrorRet); diff --git a/modules/modpython/znc.py b/modules/modpython/znc.py index 4cf24f17..c2b3c3e1 100644 --- a/modules/modpython/znc.py +++ b/modules/modpython/znc.py @@ -377,6 +377,12 @@ class Module: def OnEmbeddedWebRequest(self, WebSock, sPageName, Tmpl): pass + def OnAddNetwork(self, Network, sErrorRet): + pass + + def OnDeleteNetwork(self, Network): + pass + # Global modules def OnAddUser(self, User, sErrorRet): pass