MCPcopy Create free account
hub / github.com/ddnet/ddnet / NewClientCallback

Method NewClientCallback

src/engine/server/server.cpp:1195–1226  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1193}
1194
1195int CServer::NewClientCallback(int ClientId, void *pUser, bool Sixup)
1196{
1197 CServer *pThis = (CServer *)pUser;
1198 pThis->m_aClients[ClientId].m_State = CClient::STATE_PREAUTH;
1199 pThis->m_aClients[ClientId].m_DnsblState = EDnsblState::NONE;
1200 pThis->m_aClients[ClientId].m_aName[0] = 0;
1201 pThis->m_aClients[ClientId].m_aClan[0] = 0;
1202 pThis->m_aClients[ClientId].m_Country = -1;
1203 pThis->m_aClients[ClientId].m_AuthKey = -1;
1204 pThis->m_aClients[ClientId].m_AuthTries = 0;
1205 pThis->m_aClients[ClientId].m_AuthHidden = false;
1206 pThis->m_aClients[ClientId].m_pRconCmdToSend = nullptr;
1207 pThis->m_aClients[ClientId].m_MaplistEntryToSend = CClient::MAPLIST_UNINITIALIZED;
1208 pThis->m_aClients[ClientId].m_Traffic = 0;
1209 pThis->m_aClients[ClientId].m_TrafficSince = 0;
1210 pThis->m_aClients[ClientId].m_ShowIps = false;
1211 pThis->m_aClients[ClientId].m_DebugDummy = false;
1212 pThis->m_aClients[ClientId].m_ForceHighBandwidthOnSpectate = false;
1213 pThis->m_aClients[ClientId].m_DDNetVersion = VERSION_NONE;
1214 pThis->m_aClients[ClientId].m_GotDDNetVersionPacket = false;
1215 pThis->m_aClients[ClientId].m_DDNetVersionSettled = false;
1216 pThis->m_aClients[ClientId].Reset();
1217 pThis->m_aClients[ClientId].m_Sixup = Sixup;
1218
1219 pThis->GameServer()->TeehistorianRecordPlayerJoin(ClientId, Sixup);
1220 pThis->Antibot()->OnEngineClientJoin(ClientId);
1221
1222#if defined(CONF_FAMILY_UNIX)
1223 pThis->SendConnLoggingCommand(OPEN_SESSION, pThis->ClientAddr(ClientId));
1224#endif
1225 return 0;
1226}
1227
1228void CServer::InitDnsbl(int ClientId)
1229{

Callers

nothing calls this directly

Calls 7

OnEngineClientJoinMethod · 0.80
ResetMethod · 0.45
GameServerMethod · 0.45
AntibotMethod · 0.45
ClientAddrMethod · 0.45

Tested by

no test coverage detected