| 5 | #include "server.h" |
| 6 | |
| 7 | int CServer::NewClientCallback(int ClientID, void *pUser) |
| 8 | { |
| 9 | CServer *pThis = (CServer *)pUser; |
| 10 | |
| 11 | char aAddrStr[NETADDR_MAXSTRSIZE]; |
| 12 | net_addr_str(pThis->m_Network.ClientAddr(ClientID), aAddrStr, sizeof(aAddrStr), true); |
| 13 | if(pThis->Main()->Config()->m_Verbose) |
| 14 | dbg_msg("server", "Connection accepted. ncid=%d addr=%s'", ClientID, aAddrStr); |
| 15 | |
| 16 | pThis->m_aClients[ClientID].m_State = CClient::STATE_CONNECTED; |
| 17 | pThis->m_aClients[ClientID].m_TimeConnected = time_get(); |
| 18 | pThis->m_Network.Send(ClientID, "Authentication required:"); |
| 19 | |
| 20 | return 0; |
| 21 | } |
| 22 | |
| 23 | int CServer::DelClientCallback(int ClientID, const char *pReason, void *pUser) |
| 24 | { |
nothing calls this directly
no test coverage detected