Skip to content
Browse files

Fix new OnAdd/DeleteNetwork hooks for perl/python

  • Loading branch information...
1 parent 66eba26 commit 2a7bc29fcc58c1d986584d91eec813a5ddb11a00 @DarthGandalf DarthGandalf committed Nov 9, 2013
View
2 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)
View
4 modules/modperl/module.h
@@ -99,7 +99,9 @@ class CPerlModule : public CModule {
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) {
View
2 modules/modperl/startup.pl
@@ -369,6 +369,8 @@ sub module_types {
sub OnServerCapResult {}
sub OnTimerAutoJoin {}
sub OnEmbeddedWebRequest {}
+sub OnAddNetwork {}
+sub OnDeleteNetwork {}
# Functions of CModule will be usable from perl modules.
View
2 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)
View
4 modules/modpython/module.h
@@ -115,7 +115,9 @@ class CPyModule : public CModule {
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);
View
6 modules/modpython/znc.py
@@ -377,6 +377,12 @@ def OnTimerAutoJoin(self, Channel):
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

0 comments on commit 2a7bc29

Please sign in to comment.
Something went wrong with that request. Please try again.