Ejemplo n.º 1
0
// Parses for a referee command.
//	--> ref arg allows for the server console to utilize all referee commands (ent == NULL)
//
qboolean G_refCommandCheck(gentity_t *ent, char *cmd)
{
		 if(!Q_stricmp(cmd, "allready"))	G_refAllReady_cmd(ent);
	else if(!Q_stricmp(cmd, "lock"))		G_refLockTeams_cmd(ent, qtrue);
	else if(!Q_stricmp(cmd, "help"))		G_refHelp_cmd(ent);
	else if(!Q_stricmp(cmd, "pause"))		G_refPause_cmd(ent, qtrue);
	else if(!Q_stricmp(cmd, "putallies"))	G_refPlayerPut_cmd(ent, TEAM_ALLIES);
	else if(!Q_stricmp(cmd, "putaxis"))		G_refPlayerPut_cmd(ent, TEAM_AXIS);
	else if(!Q_stricmp(cmd, "remove"))		G_refRemove_cmd(ent);
	else if(!Q_stricmp(cmd, "speclock"))	G_refSpeclockTeams_cmd(ent, qtrue);
	else if(!Q_stricmp(cmd, "specunlock"))	G_refSpeclockTeams_cmd(ent, qfalse);
	else if(!Q_stricmp(cmd, "unlock"))		G_refLockTeams_cmd(ent, qfalse);
	else if(!Q_stricmp(cmd, "unpause"))		G_refPause_cmd(ent, qfalse);
	else if(!Q_stricmp(cmd, "warmup"))		G_refWarmup_cmd(ent);
	else if(!Q_stricmp(cmd, "warn"))		G_refWarning_cmd(ent);
	// yada - handled by the vote functions now
	//else if(!Q_stricmp(cmd, "mute"))		G_refMute_cmd(ent, qtrue); 
	//else if(!Q_stricmp(cmd, "unmute"))		G_refMute_cmd(ent, qfalse);

	// pheno
	else if( !Q_stricmp( cmd, "makeshoutcaster" ) )
		G_refMakeShoutcaster_cmd( ent );
	else if( !Q_stricmp( cmd, "removeshoutcaster" ) )
		G_refRemoveShoutcaster_cmd( ent );
	else if( !Q_stricmp( cmd, "logout" ) )
		G_refLogout_cmd( ent );

	else return(qfalse);

	return(qtrue);
}
Ejemplo n.º 2
0
// Parses for a referee command.
//	--> ref arg allows for the server console to utilize all referee commands (ent == NULL)
//
qboolean G_refCommandCheck(gentity_t *ent, char *cmd)
{
		 if(!Q_stricmp(cmd, "allready"))	G_refAllReady_cmd(ent);
	else if(!Q_stricmp(cmd, "lock"))		G_refLockTeams_cmd(ent, qtrue);
	else if(!Q_stricmp(cmd, "help"))		G_refHelp_cmd(ent);
	else if(!Q_stricmp(cmd, "pause"))		G_refPause_cmd(ent, qtrue);
	else if(!Q_stricmp(cmd, "putallies"))	G_refPlayerPut_cmd(ent, TEAM_ALLIES);
	else if(!Q_stricmp(cmd, "putaxis"))		G_refPlayerPut_cmd(ent, TEAM_AXIS);
	else if(!Q_stricmp(cmd, "remove"))		G_refRemove_cmd(ent);
	else if(!Q_stricmp(cmd, "speclock"))	G_refSpeclockTeams_cmd(ent, qtrue);
	else if(!Q_stricmp(cmd, "specunlock"))	G_refSpeclockTeams_cmd(ent, qfalse);
	else if(!Q_stricmp(cmd, "unlock"))		G_refLockTeams_cmd(ent, qfalse);
	else if(!Q_stricmp(cmd, "unpause"))		G_refPause_cmd(ent, qfalse);
	else if(!Q_stricmp(cmd, "warmup"))		G_refWarmup_cmd(ent);
	else if(!Q_stricmp(cmd, "warn"))		G_refWarning_cmd(ent);
	else if(!Q_stricmp(cmd, "mute"))		G_refMute_cmd(ent, qtrue);
	else if(!Q_stricmp(cmd, "unmute"))		G_refMute_cmd(ent, qfalse);
	else return(qfalse);

	return(qtrue);
}