| 11 | } |
| 12 | |
| 13 | int CEcon::NewClientCallback(int ClientId, void *pUser) |
| 14 | { |
| 15 | CEcon *pThis = (CEcon *)pUser; |
| 16 | |
| 17 | char aAddrStr[NETADDR_MAXSTRSIZE]; |
| 18 | net_addr_str(pThis->m_NetConsole.ClientAddr(ClientId), aAddrStr, sizeof(aAddrStr), true); |
| 19 | char aBuf[128]; |
| 20 | str_format(aBuf, sizeof(aBuf), "client accepted. cid=%d addr=%s'", ClientId, aAddrStr); |
| 21 | pThis->Console()->Print(IConsole::OUTPUT_LEVEL_ADDINFO, "econ", aBuf); |
| 22 | |
| 23 | pThis->m_aClients[ClientId].m_State = CClient::STATE_CONNECTED; |
| 24 | pThis->m_aClients[ClientId].m_TimeConnected = time_get(); |
| 25 | pThis->m_aClients[ClientId].m_AuthTries = 0; |
| 26 | |
| 27 | pThis->m_NetConsole.Send(ClientId, "Enter password:"); |
| 28 | return 0; |
| 29 | } |
| 30 | |
| 31 | int CEcon::DelClientCallback(int ClientId, const char *pReason, void *pUser) |
| 32 | { |
nothing calls this directly
no test coverage detected