| 2586 | } |
| 2587 | |
| 2588 | void CServer::FillAntibot(CAntibotRoundData *pData) |
| 2589 | { |
| 2590 | for(int ClientId = 0; ClientId < MAX_CLIENTS; ClientId++) |
| 2591 | { |
| 2592 | CAntibotPlayerData *pPlayer = &pData->m_aPlayers[ClientId]; |
| 2593 | if(m_aClients[ClientId].m_State == CServer::CClient::STATE_EMPTY) |
| 2594 | { |
| 2595 | pPlayer->m_aAddress[0] = '\0'; |
| 2596 | } |
| 2597 | else |
| 2598 | { |
| 2599 | // No need for expensive str_copy since we don't truncate and the string is |
| 2600 | // ASCII anyway |
| 2601 | static_assert(std::size((CAntibotPlayerData{}).m_aAddress) >= NETADDR_MAXSTRSIZE); |
| 2602 | static_assert(std::is_same_v<decltype(CServer{}.ClientAddrStringImpl(ClientId, true)), const std::array<char, NETADDR_MAXSTRSIZE> &>); |
| 2603 | mem_copy(pPlayer->m_aAddress, ClientAddrStringImpl(ClientId, true).data(), NETADDR_MAXSTRSIZE); |
| 2604 | pPlayer->m_Sixup = m_aClients[ClientId].m_Sixup; |
| 2605 | pPlayer->m_DnsblNone = m_aClients[ClientId].m_DnsblState == EDnsblState::NONE; |
| 2606 | pPlayer->m_DnsblPending = m_aClients[ClientId].m_DnsblState == EDnsblState::PENDING; |
| 2607 | pPlayer->m_DnsblBlacklisted = m_aClients[ClientId].m_DnsblState == EDnsblState::BLACKLISTED; |
| 2608 | pPlayer->m_Authed = IsRconAuthed(ClientId); |
| 2609 | } |
| 2610 | } |
| 2611 | } |
| 2612 | |
| 2613 | void CServer::ExpireServerInfo() |
| 2614 | { |