| 151 | } |
| 152 | |
| 153 | int CNetServer::NumClientsWithAddr(NETADDR Addr) |
| 154 | { |
| 155 | int FoundAddr = 0; |
| 156 | for(int i = 0; i < MaxClients(); ++i) |
| 157 | { |
| 158 | if(m_aSlots[i].m_Connection.State() == CNetConnection::EState::OFFLINE || |
| 159 | (m_aSlots[i].m_Connection.State() == CNetConnection::EState::ERROR && |
| 160 | (!m_aSlots[i].m_Connection.m_TimeoutProtected || |
| 161 | !m_aSlots[i].m_Connection.m_TimeoutSituation))) |
| 162 | continue; |
| 163 | |
| 164 | if(!net_addr_comp_noport(&Addr, m_aSlots[i].m_Connection.PeerAddress())) |
| 165 | FoundAddr++; |
| 166 | } |
| 167 | |
| 168 | return FoundAddr; |
| 169 | } |
| 170 | |
| 171 | bool CNetServer::Connlimit(NETADDR Addr) |
| 172 | { |
nothing calls this directly
no test coverage detected