MCPcopy Create free account
hub / github.com/cppla/ServerStatus / DelClientCallback

Method DelClientCallback

server/src/server.cpp:23–37  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

21}
22
23int 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
39int CServer::Init(CMain *pMain, const char *Bind, int Port)
40{

Callers

nothing calls this directly

Calls 6

net_addr_strFunction · 0.85
dbg_msgFunction · 0.85
ClientAddrMethod · 0.80
ConfigMethod · 0.80
MainMethod · 0.80
OnDelClientMethod · 0.80

Tested by

no test coverage detected