This commit is contained in:
Alexey Sokolov
2024-01-05 00:45:41 +00:00
parent 4cbccac707
commit 66137bd89a
7 changed files with 186 additions and 12 deletions
+14 -2
View File
@@ -1417,12 +1417,24 @@ void CIRCNetwork::IRCDisconnected() {
CheckIRCConnect();
}
void CIRCNetwork::NotifyServerDependentCap(const CString& sCap, bool bValue) {
void CIRCNetwork::PotentiallyNotifyServerDependentCap(const CString& sCap, bool bValue) {
CString sValue = GetIRCSock() ? GetIRCSock()->GetCapLsValue(sCap) : "";
for (CClient* pClient : m_vClients) {
pClient->NotifyServerDependentCap(sCap, bValue);
pClient->PotentiallyNotifyServerDependentCap(sCap, bValue, sValue);
}
}
void CIRCNetwork::NotifyClientsAboutServerDependentCap(const CString& sCap, bool bValue, const std::function<void(CClient*, bool)>& handler) {
CString sValue = GetIRCSock() ? GetIRCSock()->GetCapLsValue(sCap) : "";
for (CClient* pClient : m_vClients) {
pClient->NotifyServerDependentCap(sCap, bValue, sValue, handler);
}
}
bool CIRCNetwork::IsServerCapAccepted(const CString& sCap) const {
return m_pIRCSock && m_pIRCSock->IsCapAccepted(sCap);
}
void CIRCNetwork::SetIRCConnectEnabled(bool b) {
m_bIRCConnectEnabled = b;