All pastes #817890 Raw Edit

Untitled

public text v1 · immutable
·published 2007-12-15 23:11 UTC
rendered paste body
static void SV_UpdateUserinfo_f( client_t *cl ) {
 
	if (sv_userFloodProtect->integer &&  //You'll have to create this
		svs.time < cl->nextReliableUserTime ) //This too
	{
		return;
	}

	// don't allow another command for one second
	cl->nextReliableUserTime = svs.time + 1000;

	Q_strncpyz( cl->userinfo, Cmd_Argv(1), sizeof(cl->userinfo) );

	SV_UserinfoChanged( cl );
	// call prog code to allow overrides
	VM_Call( gvm, GAME_CLIENT_USERINFO_CHANGED, cl - svs.clients );
}