示例#1
0
void xrServer::AttachNewClient			(IClient* CL)
{
	MSYS_CONFIG	msgConfig;
	msgConfig.sign1 = 0x12071980;
	msgConfig.sign2 = 0x26111975;
	msgConfig.is_battleye = 0;

#ifdef BATTLEYE
	msgConfig.is_battleye = (g_pGameLevel && Level().battleye_system.server != 0)? 1 : 0;
#endif // BATTLEYE

	if(psNET_direct_connect)  //single_game
	{
        SV_Client			= CL;
		CL->flags.bLocal	= 1;
		SendTo_LL( SV_Client->ID, &msgConfig, sizeof(msgConfig), net_flags(TRUE,TRUE,TRUE,TRUE) );
	}
	else
	{
		SendTo_LL				(CL->ID,&msgConfig,sizeof(msgConfig), net_flags(TRUE, TRUE, TRUE, TRUE));
		Server_Client_Check		(CL); 
	}

	// gen message
	if (!NeedToCheckClient_GameSpy_CDKey(CL))
	{
	//-------------------------------------------------------------
	Check_GameSpy_CDKey_Success(CL);
 }

	//xrClientData * CL_D=(xrClientData*)(CL); 
	//ip_address				ClAddress;
	//GetClientAddress		(CL->ID, ClAddress);
	CL->m_guid[0]=0;
}
示例#2
0
void			xrGameSpyServer::OnCDKey_Validation				(int LocalID, int res, char* errormsg)
{
	ClientID ID; ID.set(u32(LocalID));
	xrGameSpyClientData* CL = (xrGameSpyClientData*)  ID_to_client(ID);
	if (0 != res)
	{
		CL->m_bCDKeyAuth = true;
#ifndef MASTER_GOLD
		Msg("xrGS::CDKey: Validation successful - <%s>", errormsg);
#endif // #ifndef MASTER_GOLD
		Check_GameSpy_CDKey_Success(CL);
	}
	else
	{
		Msg						("CDKey: Validation failed - <%s>", errormsg);
		SendConnectResult		(CL, u8(res), u8(1), errormsg);
	}
};