Beispiel #1
0
/*
* SV_ResolveMaster
*/
static void SV_ResolveMaster( void )
{
	char *master, *mlist;

	// wsw : jal : initialize masters list
	memset( master_adr, 0, sizeof( master_adr ) );

	//never go public when not acting as a game server
	if( sv.state > ss_game )
		return;

	if( !sv_public->integer )
		return;

	mlist = sv_masterservers->string;
	if( *mlist )
	{
		while( mlist )
		{
			master = COM_Parse( &mlist );
			if( !master[0] )
				break;

			SV_AddMaster_f( master );
		}
	}

	svc.lastMasterResolve = Sys_Milliseconds();
}
Beispiel #2
0
//====================
//SV_InitMaster
//Set up the main master server
//====================
void SV_InitMaster( void )
{
	char *master, *mlist;

	// wsw : jal : initialize masters list
	memset( master_adr, 0, sizeof( master_adr ) );

	//never go public when not acting as a game server
	if( sv.state > ss_game )
		return;

	if( !sv_public->integer )
		return;

	mlist = sv_masterservers->string;
	if( *mlist )
	{
		while( mlist )
		{
			master = COM_Parse( &mlist );
			if( !master[0] )
				break;

			SV_AddMaster_f( master );
		}
	}

	svc.last_heartbeat = HEARTBEAT_SECONDS * 1000; // wait a while before sending first heartbeat
}