mirror of
https://github.com/znc/znc.git
synced 2026-03-28 17:42:41 +01:00
Merge branch 'master' into sasl
Conflicts: include/znc/Client.h src/Client.cpp src/Modules.cpp test/integration/tests/modules.cpp
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2004-2023 ZNC, see the NOTICE file for details.
|
||||
* Copyright (C) 2004-2025 ZNC, see the NOTICE file for details.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -136,7 +136,10 @@ class ZNC_EXPORT_LIB_EXPORT CPyModule : public CModule {
|
||||
CString& sMessage) override;
|
||||
EModRet OnTopic(CNick& Nick, CChan& Channel, CString& sTopic) override;
|
||||
bool OnServerCapAvailable(const CString& sCap) override;
|
||||
bool OnServerCap302Available(const CString& sCap, const CString& sValue) override;
|
||||
void OnServerCapResult(const CString& sCap, bool bSuccess) override;
|
||||
void OnClientAttached() override;
|
||||
void OnClientDetached() override;
|
||||
EModRet OnTimerAutoJoin(CChan& Channel) override;
|
||||
bool OnEmbeddedWebRequest(CWebSock&, const CString&, CTemplate&) override;
|
||||
EModRet OnAddNetwork(CIRCNetwork& Network, CString& sErrorRet) override;
|
||||
@@ -374,3 +377,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