CString CUser::GetLocalDCCIP() { if (!GetDCCBindHost().empty()) return GetDCCBindHost(); for (vector<CIRCNetwork*>::iterator it = m_vIRCNetworks.begin(); it != m_vIRCNetworks.end(); ++it) { CIRCNetwork *pNetwork = *it; CIRCSock* pIRCSock = pNetwork->GetIRCSock(); if (pIRCSock) { return pIRCSock->GetLocalIP(); } } if (!GetAllClients().empty()) { return GetAllClients()[0]->GetLocalIP(); } return ""; }
bool CUser::PutStatusNotice(const CString& sLine, CClient* pClient, CClient* pSkipClient) { vector<CClient*> vClients = GetAllClients(); for (unsigned int a = 0; a < vClients.size(); a++) { if ((!pClient || pClient == vClients[a]) && pSkipClient != vClients[a]) { vClients[a]->PutStatusNotice(sLine); if (pClient) { return true; } } } return (pClient == NULL); }