modpython: Support global module hooks #98

The commit doesn't add support for the following module hooks:

    void OnClientCapLs(CClient* pClient, SCString& ssCaps)
    EModRet OnLoginAttempt(CSmartPtr<CAuthBase> Auth)

The reason for this is they do not currently work with codegen.pl
This commit is contained in:
Kyle Fuller
2012-02-26 14:17:57 +00:00
parent 478dace3f5
commit 961e3a81c6
4 changed files with 78 additions and 10 deletions
+17 -1
View File
@@ -108,7 +108,23 @@ public:
virtual void OnServerCapResult(const CString& sCap, bool bSuccess);
virtual EModRet OnTimerAutoJoin(CChan& Channel);
bool OnEmbeddedWebRequest(CWebSock&, const CString&, CTemplate&);
EModRet OnModuleLoading(const CString& sModName, const CString& sArgs, CModInfo::EModuleType eType, bool& bSuccess, CString& sRetMsg);
// Global Modules
virtual EModRet OnAddUser(CUser& User, CString& sErrorRet);
virtual EModRet OnDeleteUser(CUser& User);
virtual void OnClientConnect(CZNCSock* pSock, const CString& sHost, unsigned short uPort);
virtual EModRet OnLoginAttempt(CSmartPtr<CAuthBase> Auth);
virtual void OnFailedLogin(const CString& sUsername, const CString& sRemoteIP);
virtual EModRet OnUnknownUserRaw(CClient* pClient, CString& sLine);
virtual void OnClientCapLs(CClient* pClient, SCString& ssCaps);
virtual bool IsClientCapSupported(CClient* pClient, const CString& sCap, bool bState);
virtual void OnClientCapRequest(CClient* pClient, const CString& sCap, bool bState);
virtual EModRet OnModuleLoading(const CString& sModName, const CString& sArgs,
CModInfo::EModuleType eType, bool& bSuccess, CString& sRetMsg);
virtual EModRet OnModuleUnloading(CModule* pModule, bool& bSuccess, CString& sRetMsg);
virtual EModRet OnGetModInfo(CModInfo& ModInfo, const CString& sModule,
bool& bSuccess, CString& sRetMsg);
virtual void OnGetAvailableMods(set<CModInfo>& ssMods, CModInfo::EModuleType eType);
};
static inline CPyModule* AsPyModule(CModule* p) {