コード例 #1
0
ファイル: g_svcmds.c プロジェクト: redrumrobot/r-unlimited-cz
void G_UnregisterCommands( void )
{
  int i;

  for( i = 0; i < sizeof( svcmds ) / sizeof( svcmds[ 0 ] ); i++ )
  {
    if( svcmds[ i ].dedicated && !g_dedicated.integer )
      continue;
    trap_RemoveCommand( svcmds[ i ].cmd );
  }

  G_admin_unregister_cmds( );
}
コード例 #2
0
void G_UnregisterCommands()
{
    for ( unsigned i = 0; i < ARRAY_LEN( svcmds ); i++ )
    {
        if ( svcmds[ i ].conflicts && level.inClient )
        {
            continue;
        }

        trap_RemoveCommand( svcmds[ i ].cmd );
    }

    G_admin_unregister_cmds();
}
コード例 #3
0
ファイル: g_svcmds.c プロジェクト: Sixthly/Unvanquished
void G_UnregisterCommands( void )
{
	int i;

	for ( i = 0; i < ARRAY_LEN( svcmds ); i++ )
	{
		if ( svcmds[ i ].dedicated && !g_dedicated.integer )
		{
			continue;
		}

		trap_RemoveCommand( svcmds[ i ].cmd );
	}

	G_admin_unregister_cmds();
}
コード例 #4
0
ファイル: cg_consolecmds.c プロジェクト: Classixz/etlegacy
/**
 * @brief Let the client system know about all of our commands so it can perform tab
 * completion
 */
void CG_InitConsoleCommands(void)
{
	int        i;
	const char *s;

	for (i = 0 ; i < sizeof(commands) / sizeof(commands[0]) ; i++)
	{
		trap_AddCommand(commands[i].cmd);
	}

	// the game server will interpret these commands, which will be automatically
	// forwarded to the server after they are not recognized locally
	trap_AddCommand("kill");
	trap_AddCommand("say");
	trap_AddCommand("give");
	trap_AddCommand("god");
	trap_AddCommand("notarget");
	trap_AddCommand("noclip");
	trap_AddCommand("team");
	trap_AddCommand("follow");
	trap_AddCommand("setviewpos");
	trap_AddCommand("callvote");
	trap_AddCommand("vote");

	trap_AddCommand("nofatigue");

	trap_AddCommand("follownext");
	trap_AddCommand("followprev");

	trap_AddCommand("start_match");
	trap_AddCommand("reset_match");
	trap_AddCommand("swap_teams");

	trap_AddCommand("?");
	trap_AddCommand("bottomshots");
	trap_AddCommand("commands");
	trap_AddCommand("lock");
#ifdef FEATURE_MULTIVIEW
	trap_AddCommand("mvadd");
	trap_AddCommand("mvaxis");
	trap_AddCommand("mvallies");
	trap_AddCommand("mvall");
	trap_AddCommand("mvnone");
#endif
	trap_AddCommand("notready");
	trap_AddCommand("pause");
	trap_AddCommand("players");
	trap_AddCommand("readyteam");
	trap_AddCommand("ready");
	trap_AddCommand("ref");
	trap_AddCommand("say_teamnl");
	trap_AddCommand("say_team");
	trap_AddCommand("scores");
	trap_AddCommand("specinvite");
	trap_AddCommand("speclock");
	trap_AddCommand("specunlock");
	trap_AddCommand("statsall");
	trap_AddCommand("statsdump");
	trap_AddCommand("timein");
	trap_AddCommand("timeout");
	trap_AddCommand("topshots");
	trap_AddCommand("unlock");
	trap_AddCommand("unpause");
	trap_AddCommand("unready");
	trap_AddCommand("weaponstats");

	trap_AddCommand("fireteam");
	trap_AddCommand("showstats");

	trap_AddCommand("ignore");
	trap_AddCommand("unignore");

	trap_AddCommand("campaign");
	trap_AddCommand("listcampaigns");

	trap_AddCommand("imready");
	trap_AddCommand("say_buddy");
	trap_AddCommand("setspawnpt");
	trap_AddCommand("vsay");
	trap_AddCommand("vsay_buddy");
	trap_AddCommand("vsay_team");
	trap_AddCommand("where");
#ifdef FEATURE_LUA
	trap_AddCommand("lua_status");
#endif

	// remove engine commands to avoid abuse
	trap_RemoveCommand("+lookup");
	trap_RemoveCommand("-lookup");
	trap_RemoveCommand("+lookdown");
	trap_RemoveCommand("-lookdown");

	// only allow configstrings command when cheats enabled
	s = Info_ValueForKey(CG_ConfigString(CS_SYSTEMINFO),
	                     "sv_cheats");
	if (s[0] != '1')
	{
		trap_RemoveCommand("configstrings");
	}
}
コード例 #5
0
ファイル: cg_consolecmds.c プロジェクト: thewolfteam/Reloaded
/*
=================
CG_InitConsoleCommands

Let the client system know about all of our commands
so it can perform tab completion
=================
*/
void CG_InitConsoleCommands( void ) {
	int		i;
	const char *s;

	for ( i = 0 ; i < sizeof( commands ) / sizeof( commands[0] ) ; i++ ) {
		trap_AddCommand( commands[i].cmd );
	}

	//
	// the game server will interpret these commands, which will be automatically
	// forwarded to the server after they are not recognized locally
	//
	trap_AddCommand ("kill");
	// CHRUKER: b011 - Doesn't exist
	//trap_AddCommand ("say_limbo");
	// CHRUKER: b011 - Doesn't exist
	//trap_AddCommand ("tell");
	trap_AddCommand ("listbotgoals");
	trap_AddCommand ("give");
	trap_AddCommand ("god");
	trap_AddCommand ("notarget");
	trap_AddCommand ("noclip");
	trap_AddCommand ("team");
	trap_AddCommand ("follow");
	// CHRUKER: b011 - Not activated
	//trap_AddCommand ("addbot");
	trap_AddCommand ("setviewpos");
	trap_AddCommand ("callvote");
	trap_AddCommand ("vote");

	// Rafael
	trap_AddCommand ("nofatigue");

	// NERVE - SMF
	trap_AddCommand ("follownext");
	trap_AddCommand ("followprev");

	trap_AddCommand ("start_match");
	trap_AddCommand ("reset_match");
	trap_AddCommand ("swap_teams");
	// -NERVE - SMF
	// OSP
	trap_AddCommand("?");
	trap_AddCommand("bottomshots");
	trap_AddCommand("commands");
	// CHRUKER: b011 - Duplicate, look further up
	//trap_AddCommand("follow");
	trap_AddCommand("lock");
#ifdef MV_SUPPORT
	trap_AddCommand("mvadd");
	trap_AddCommand("mvaxis");
	trap_AddCommand("mvallies");
	trap_AddCommand("mvall");
	trap_AddCommand("mvnone");
#endif
	trap_AddCommand("notready");
	trap_AddCommand("pause");
	trap_AddCommand("players");
	trap_AddCommand("readyteam");
	trap_AddCommand("ready");
	trap_AddCommand("ref");
	trap_AddCommand("say_teamnl");
	trap_AddCommand("say_team");
	trap_AddCommand("say");
	trap_AddCommand("scores");
	trap_AddCommand("specinvite");
	trap_AddCommand("speclock");
	trap_AddCommand("specunlock");
	trap_AddCommand("statsall");
	trap_AddCommand("statsdump");
	trap_AddCommand("timein");
	trap_AddCommand("timeout");
	trap_AddCommand("topshots");
	trap_AddCommand("unlock");
	trap_AddCommand("unpause");
	trap_AddCommand("unready");
	trap_AddCommand("weaponstats");
	// OSP

	trap_AddCommand("fireteam");
	// CHRUKER: b011 - Doesn't exist
	//trap_AddCommand ("buddylist");
	trap_AddCommand("showstats");

	trap_AddCommand("ignore");
	trap_AddCommand("unignore");

	// CHRUKER: b011 - Doesn't exist
	//trap_AddCommand ("addtt");
	// CHRUKER: b011 - Duplicate of an existing client side command
	//trap_AddCommand ("selectbuddy"); 
	// CHRUKER: b011 - Doesn't exist
	//trap_AddCommand ("selectNextBuddy");	// xkan 9/26/2002
	
	// CHRUKER: b011 - Missing commands
	trap_AddCommand ("imready");
	trap_AddCommand ("say_buddy");
	trap_AddCommand ("setspawnpt");
	trap_AddCommand ("vsay");
	trap_AddCommand ("vsay_buddy");
	trap_AddCommand ("vsay_team");
	trap_AddCommand ("where");

	// kw: new etpub commands
	trap_AddCommand("hitsounds");
	trap_AddCommand("m");
	trap_AddCommand("mt");
	trap_AddCommand("damage");
	trap_AddCommand("killrating");
	trap_AddCommand("playerrating");
	trap_AddCommand("playdead");
	trap_AddCommand("throwknife");
	trap_AddCommand("adrenother");
	trap_AddCommand("knives");
	trap_AddCommand("class");
	trap_AddCommand("nextteam");

	trap_AddCommand("dropweapon"); // Terifire
	trap_AddCommand("sclogin");
	trap_AddCommand("sclogout");
	trap_AddCommand("shoutcastlogin");
	trap_AddCommand("shoutcastlogout");
	trap_AddCommand("lua_status");
	trap_AddCommand("etpub_version");

	// TODO just for testing, remove me later
	trap_AddCommand("cyclechar");
	trap_AddCommand("setchar");

	// tjw: remove engine commands
	trap_RemoveCommand("+lookup");
	trap_RemoveCommand("-lookup");
	trap_RemoveCommand("+lookdown");
	trap_RemoveCommand("-lookdown");

	// kw : only allow configstrings command when cheats enabled
	s = Info_ValueForKey( CG_ConfigString( CS_SYSTEMINFO ),
							"sv_cheats" );
	if ( s[0] != '1' ) {
		trap_RemoveCommand("configstrings");
	}
}