mirror of
https://github.com/znc/znc.git
synced 2026-05-01 02:52:30 +02:00
Make it possible for modules to send values in CAP LS
This commit is contained in:
@@ -706,6 +706,7 @@ void CClient::HandleCap(const CMessage& Message) {
|
||||
CString sSubCmd = Message.GetParam(0);
|
||||
|
||||
if (sSubCmd.Equals("LS")) {
|
||||
m_uCapVersion = Message.GetParam(1).ToInt();
|
||||
SCString ssOfferCaps;
|
||||
for (const auto& it : m_mCoreCaps) {
|
||||
bool bServerDependent = std::get<0>(it.second);
|
||||
@@ -716,8 +717,7 @@ void CClient::HandleCap(const CMessage& Message) {
|
||||
GLOBALMODULECALL(OnClientCapLs(this, ssOfferCaps), NOTHING);
|
||||
VCString vsCaps = MultiLine(ssOfferCaps);
|
||||
m_bInCap = true;
|
||||
if (Message.GetParam(1).ToInt() >= 302) {
|
||||
m_bCap302 = true;
|
||||
if (HasCap302()) {
|
||||
m_bCapNotify = true;
|
||||
for (int i = 0; i < vsCaps.size() - 1; ++i) {
|
||||
RespondCap("LS * :" + vsCaps[i]);
|
||||
@@ -785,7 +785,7 @@ void CClient::HandleCap(const CMessage& Message) {
|
||||
RespondCap("ACK :" + Message.GetParam(1));
|
||||
} else if (sSubCmd.Equals("LIST")) {
|
||||
VCString vsCaps = MultiLine(m_ssAcceptedCaps);
|
||||
if (m_bCap302) {
|
||||
if (HasCap302()) {
|
||||
for (int i = 0; i < vsCaps.size() - 1; ++i) {
|
||||
RespondCap("LIST * :" + vsCaps[i]);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user