mirror of
https://github.com/znc/znc.git
synced 2026-08-12 11:52:57 +02:00
Implement cap negotiation 3.2 on server side
Used for "server-dependent" caps which already rely on sending NEW and DEL to client. This functionality is not yet available for caps added by modules.
This commit is contained in:
@@ -61,6 +61,7 @@ EModRet OnPrivNotice(CNick& Nick, CString& sMessage)
|
||||
EModRet OnChanNotice(CNick& Nick, CChan& Channel, CString& sMessage)
|
||||
EModRet OnTopic(CNick& Nick, CChan& Channel, CString& sTopic)
|
||||
bool OnServerCapAvailable(const CString& sCap)
|
||||
bool OnServerCap302Available(const CString& sCap, const CString& sValue)
|
||||
void OnServerCapResult(const CString& sCap, bool bSuccess)
|
||||
EModRet OnTimerAutoJoin(CChan& Channel)
|
||||
bool OnEmbeddedWebRequest(CWebSock& WebSock, const CString& sPageName, CTemplate& Tmpl)
|
||||
|
||||
@@ -116,6 +116,7 @@ class ZNC_EXPORT_LIB_EXPORT CPerlModule : 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;
|
||||
EModRet OnTimerAutoJoin(CChan& Channel) override;
|
||||
bool OnEmbeddedWebRequest(CWebSock&, const CString&, CTemplate&) override;
|
||||
|
||||
@@ -405,6 +405,7 @@ sub OnPrivNotice {}
|
||||
sub OnChanNotice {}
|
||||
sub OnTopic {}
|
||||
sub OnServerCapAvailable {}
|
||||
sub OnServerCap302Available { my ($self, $cap, $value) = @_; $self->OnServerCapAvailable($cap) }
|
||||
sub OnServerCapResult {}
|
||||
sub OnTimerAutoJoin {}
|
||||
sub OnEmbeddedWebRequest {}
|
||||
|
||||
@@ -61,6 +61,7 @@ EModRet OnPrivNotice(CNick& Nick, CString& sMessage)
|
||||
EModRet OnChanNotice(CNick& Nick, CChan& Channel, CString& sMessage)
|
||||
EModRet OnTopic(CNick& Nick, CChan& Channel, CString& sTopic)
|
||||
bool OnServerCapAvailable(const CString& sCap)
|
||||
bool OnServerCap302Available(const CString& sCap, const CString& sValue)
|
||||
void OnServerCapResult(const CString& sCap, bool bSuccess)
|
||||
EModRet OnTimerAutoJoin(CChan& Channel)
|
||||
bool OnEmbeddedWebRequest(CWebSock& WebSock, const CString& sPageName, CTemplate& Tmpl)
|
||||
|
||||
@@ -136,6 +136,7 @@ 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;
|
||||
EModRet OnTimerAutoJoin(CChan& Channel) override;
|
||||
bool OnEmbeddedWebRequest(CWebSock&, const CString&, CTemplate&) override;
|
||||
|
||||
@@ -410,6 +410,9 @@ class Module:
|
||||
def OnServerCapAvailable(self, sCap):
|
||||
pass
|
||||
|
||||
def OnServerCap302Available(self, sCap, sValue):
|
||||
return self.OnServerCapAvailable(sCap)
|
||||
|
||||
def OnServerCapResult(self, sCap, bSuccess):
|
||||
pass
|
||||
|
||||
|
||||
Reference in New Issue
Block a user