| 21 | } |
| 22 | |
| 23 | int CServer::DelClientCallback(int ClientID, const char *pReason, void *pUser) |
| 24 | { |
| 25 | CServer *pThis = (CServer *)pUser; |
| 26 | |
| 27 | char aAddrStr[NETADDR_MAXSTRSIZE]; |
| 28 | net_addr_str(pThis->m_Network.ClientAddr(ClientID), aAddrStr, sizeof(aAddrStr), true); |
| 29 | if(pThis->Main()->Config()->m_Verbose) |
| 30 | dbg_msg("server", "Client dropped. ncid=%d addr=%s reason='%s'", ClientID, aAddrStr, pReason); |
| 31 | |
| 32 | if(pThis->m_aClients[ClientID].m_State == CClient::STATE_AUTHED) |
| 33 | pThis->Main()->OnDelClient(ClientID); |
| 34 | pThis->m_aClients[ClientID].m_State = CClient::STATE_EMPTY; |
| 35 | |
| 36 | return 0; |
| 37 | } |
| 38 | |
| 39 | int CServer::Init(CMain *pMain, const char *Bind, int Port) |
| 40 | { |
nothing calls this directly
no test coverage detected