mirror of
https://github.com/znc/znc.git
synced 2026-03-28 17:42:41 +01:00
Merge pull request #752 from jpnurmi/findclients
Replace CIRCNetwork::FindClient() with FindClients()
This commit is contained in:
@@ -76,7 +76,7 @@ public:
|
||||
const CString& GetName() const;
|
||||
bool IsNetworkAttached() const { return !m_vClients.empty(); }
|
||||
const std::vector<CClient*>& GetClients() const { return m_vClients; }
|
||||
CClient* FindClient(const CString& sIdentifier) const;
|
||||
std::vector<CClient*> FindClients(const CString& sIdentifier) const;
|
||||
|
||||
void SetUser(CUser *pUser);
|
||||
bool SetName(const CString& sName);
|
||||
|
||||
@@ -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