Permalink
Browse files

Fix new OnAdd/DeleteNetwork hooks for perl/python

(cherry picked from commit 2a7bc29)
  • Loading branch information...
1 parent 8deb283 commit e391c4e266eec0f9cdba918fe98174e3dd52bb30 @DarthGandalf DarthGandalf committed Nov 9, 2013
@@ -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
@@ -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) {
@@ -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.
@@ -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)
@@ -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
@@ -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 e391c4e

Please sign in to comment.