mirror of
https://github.com/znc/znc.git
synced 2026-05-18 15:25:53 +02:00
Replace CIRCNetwork::FindClient() with FindClients()
FindClient() is not enough, because there are no restrictions to used identifiers. They don't necessarily need to be unique, and the same identified client might re-connect meanwhile a ghost connection is still hanging there.
This commit is contained in:
+4
-3
@@ -669,14 +669,15 @@ const CString& CIRCNetwork::GetName() const {
|
||||
return m_sName;
|
||||
}
|
||||
|
||||
CClient* CIRCNetwork::FindClient(const CString& sIdentifier) const {
|
||||
std::vector<CClient*> CIRCNetwork::FindClients(const CString& sIdentifier) const {
|
||||
std::vector<CClient*> vClients;
|
||||
for (CClient* pClient : m_vClients) {
|
||||
if (pClient->GetIdentifier().Equals(sIdentifier)) {
|
||||
return pClient;
|
||||
vClients.push_back(pClient);
|
||||
}
|
||||
}
|
||||
|
||||
return NULL;
|
||||
return vClients;
|
||||
}
|
||||
|
||||
void CIRCNetwork::SetUser(CUser *pUser) {
|
||||
|
||||
Reference in New Issue
Block a user