mirror of
https://github.com/znc/znc.git
synced 2026-03-28 17:42:41 +01:00
Make modpython work with server-dependent caps
This commit is contained in:
@@ -369,3 +369,17 @@ inline CPyModCommand* CreatePyModCommand(CPyModule* pModule,
|
||||
PyObject* pyObj) {
|
||||
return new CPyModCommand(pModule, sCmd, sArgs, sDesc, pyObj);
|
||||
}
|
||||
|
||||
class ZNC_EXPORT_LIB_EXPORT CPyCapability : public CCapability {
|
||||
public:
|
||||
CPyCapability(PyObject* serverCb, PyObject* clientCb);
|
||||
~CPyCapability();
|
||||
|
||||
void OnServerChangedSupport(CIRCNetwork* pNetwork, bool bState) override;
|
||||
void OnClientChangedSupport(CClient* pClient, bool bState) override;
|
||||
|
||||
private:
|
||||
PyObject* m_serverCb;
|
||||
PyObject* m_clientCb;
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user