CAutoVoiceUser* FindUserByHost(const CString& sHostmask, const CString& sChannel = "") { for (const auto& it : m_msUsers) { CAutoVoiceUser* pUser = it.second; if (pUser->HostMatches(sHostmask) && (sChannel.empty() || pUser->ChannelMatches(sChannel))) { return pUser; } } return nullptr; }
CAutoVoiceUser* FindUserByHost(const CString& sHostmask, const CString& sChannel = "") { for (map<CString, CAutoVoiceUser*>::iterator it = m_msUsers.begin(); it != m_msUsers.end(); ++it) { CAutoVoiceUser* pUser = it->second; if (pUser->HostMatches(sHostmask) && (sChannel.empty() || pUser->ChannelMatches(sChannel))) { return pUser; } } return NULL; }