Changeset - r1814:ff4ef7d5e96e
[Not reviewed]
master
0 1 0
Darkvater - 19 years ago 2005-05-15 10:40:53
darkvater@openttd.org
(svn r2318) - Feature: added console command 'part' to leave a currently running game and 'join' which is an alias to 'connect' to join a multiplayer server.
1 file changed with 15 insertions and 0 deletions:
0 comments (0 inline, 0 general)
console_cmds.c
Show inline comments
 
@@ -840,12 +840,25 @@ DEF_CONSOLE_CMD(ConExit)
 
	}
 

	
 
	_exit_game = true;
 
	return true;
 
}
 

	
 
DEF_CONSOLE_CMD(ConPart)
 
{
 
	if (argc == 0) {
 
		IConsoleHelp("Leave the currently joined/running game (only ingame). Usage: 'part'");
 
		return true;
 
	}
 

	
 
	if (_game_mode != GM_NORMAL) return false;
 

	
 
	_switch_mode = SM_MENU;
 
	return true;
 
}
 

	
 
DEF_CONSOLE_CMD(ConHelp)
 
{
 
	if (argc == 2) {
 
		const IConsoleCmd *cmd;
 
		const IConsoleVar *var;
 
		const IConsoleAlias *alias;
 
@@ -1181,12 +1194,13 @@ void IConsoleStdLibRegister(void)
 
	IConsoleCmdRegister("debug_level",  ConDebugLevel);
 
	IConsoleCmdRegister("dump_vars",    ConListDumpVariables);
 
	IConsoleCmdRegister("echo",         ConEcho);
 
	IConsoleCmdRegister("echoc",        ConEchoC);
 
	IConsoleCmdRegister("exec",         ConExec);
 
	IConsoleCmdRegister("exit",         ConExit);
 
	IConsoleCmdRegister("part",         ConPart);
 
	IConsoleCmdRegister("help",         ConHelp);
 
	IConsoleCmdRegister("info_cmd",     ConInfoCmd);
 
	IConsoleCmdRegister("info_var",     ConInfoVar);
 
	IConsoleCmdRegister("list_cmds",    ConListCommands);
 
	IConsoleCmdRegister("list_vars",    ConListVariables);
 
	IConsoleCmdRegister("list_aliases", ConListAliases);
 
@@ -1224,12 +1238,13 @@ void IConsoleStdLibRegister(void)
 
	IConsoleCmdRegister("kick",            ConKick);
 
	IConsoleCmdHookAdd("kick",             ICONSOLE_HOOK_ACCESS, ConHookServerOnly);
 
	IConsoleCmdRegister("reset_company",   ConResetCompany);
 
	IConsoleCmdHookAdd("reset_company",    ICONSOLE_HOOK_ACCESS, ConHookServerOnly);
 
	IConsoleAliasRegister("clean_company", "reset_company %A");
 
	IConsoleCmdRegister("connect",         ConNetworkConnect);
 
	IConsoleAliasRegister("join",          "connect %A");
 
	IConsoleCmdHookAdd("connect",          ICONSOLE_HOOK_ACCESS, ConHookClientOnly);
 
	IConsoleCmdRegister("clients",         ConNetworkClients);
 
	IConsoleCmdHookAdd("clients",          ICONSOLE_HOOK_ACCESS, ConHookNeedNetwork);
 
	IConsoleCmdRegister("status",          ConStatus);
 
	IConsoleCmdHookAdd("status",           ICONSOLE_HOOK_ACCESS, ConHookServerOnly);
 
	IConsoleCmdHookAdd("resetengines",     ICONSOLE_HOOK_ACCESS, ConHookNoNetwork);
0 comments (0 inline, 0 general)