mirror of
https://github.com/znc/znc.git
synced 2026-05-10 07:14:43 +02:00
Code cleanup
Since now there are no server-dependent caps defined in the core
This commit is contained in:
+2
-20
@@ -660,10 +660,6 @@ void CIRCNetwork::ClientConnected(CClient* pClient) {
|
||||
|
||||
size_t uIdx, uSize;
|
||||
|
||||
if (m_pIRCSock) {
|
||||
pClient->NotifyServerDependentCaps(m_pIRCSock->GetAcceptedCaps());
|
||||
}
|
||||
|
||||
pClient->SetPlaybackActive(true);
|
||||
|
||||
if (m_RawBuffer.IsEmpty()) {
|
||||
@@ -1393,10 +1389,6 @@ bool CIRCNetwork::IsIRCConnected() const {
|
||||
void CIRCNetwork::SetIRCSocket(CIRCSock* pIRCSock) { m_pIRCSock = pIRCSock; }
|
||||
|
||||
void CIRCNetwork::IRCConnected() {
|
||||
const SCString& ssCaps = m_pIRCSock->GetAcceptedCaps();
|
||||
for (CClient* pClient : m_vClients) {
|
||||
pClient->NotifyServerDependentCaps(ssCaps);
|
||||
}
|
||||
if (m_uJoinDelay > 0) {
|
||||
m_pJoinTimer->Delay(m_uJoinDelay);
|
||||
} else {
|
||||
@@ -1405,9 +1397,6 @@ void CIRCNetwork::IRCConnected() {
|
||||
}
|
||||
|
||||
void CIRCNetwork::IRCDisconnected() {
|
||||
for (CClient* pClient : m_vClients) {
|
||||
pClient->ClearServerDependentCaps();
|
||||
}
|
||||
m_pIRCSock = nullptr;
|
||||
|
||||
SetIRCServer("");
|
||||
@@ -1417,17 +1406,10 @@ void CIRCNetwork::IRCDisconnected() {
|
||||
CheckIRCConnect();
|
||||
}
|
||||
|
||||
void CIRCNetwork::PotentiallyNotifyServerDependentCap(const CString& sCap, bool bValue) {
|
||||
void CIRCNetwork::NotifyClientsAboutServerDependentCap(const CString& sCap, bool bValue) {
|
||||
CString sValue = GetIRCSock() ? GetIRCSock()->GetCapLsValue(sCap) : "";
|
||||
for (CClient* pClient : m_vClients) {
|
||||
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);
|
||||
pClient->NotifyServerDependentCap(sCap, bValue, sValue);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user