Exemplo n.º 1
0
/*
* SV_AutoUpdateCheck_f
*/
static void SV_AutoUpdateCheck_f( void )
{
	if( !sv_pure->integer )
	{
		Com_Printf( "Autoupdate is only available for pure servers\n" );
		return;
	}

	SV_AutoUpdateFromWeb( qtrue );
}
Exemplo n.º 2
0
/*
* SV_CheckAutoUpdate
*/
static void SV_CheckAutoUpdate( void )
{
	unsigned int days;

	if( !sv_pure->integer && sv_autoUpdate->integer )
	{
		Com_Printf( "WARNING: Autoupdate is not available for unpure servers.\n" );
		Cvar_ForceSet( "sv_autoUpdate", "0" );
	}

	if( !sv_autoUpdate->integer || !dedicated->integer )
		return;

	// do not if there has been any activity in the last 2 hours
	if( ( svc.last_activity + 1800000 ) > Sys_Milliseconds() )
		return;

	days = (unsigned int)sv_lastAutoUpdate->integer;

	// daily check
	if( days < Com_DaysSince1900() )
		SV_AutoUpdateFromWeb( qfalse );
}