src/console_cmds.c
branchcustombridgeheads
changeset 5648 1608018c5ff2
parent 5643 3778051e8095
--- a/src/console_cmds.c	Wed Jan 03 20:00:29 2007 +0000
+++ b/src/console_cmds.c	Thu Jan 11 13:16:26 2007 +0000
@@ -201,6 +201,19 @@
 	return false;
 }
 
+/* Explicitly save the configuration */
+DEF_CONSOLE_CMD(ConSaveConfig)
+{
+	if (argc == 0) {
+		IConsoleHelp("Saves the current config, typically to 'openttd.cfg'.");
+		return true;
+	}
+
+	SaveToConfig();
+	IConsolePrint(_icolour_def, "Saved config.");
+	return true;
+}
+
 static const FiosItem* GetFiosItem(const char* file)
 {
 	int i;
@@ -1475,6 +1488,7 @@
 	IConsoleCmdRegister("load",         ConLoad);
 	IConsoleCmdRegister("rm",           ConRemove);
 	IConsoleCmdRegister("save",         ConSave);
+	IConsoleCmdRegister("saveconfig",   ConSaveConfig);
 	IConsoleCmdRegister("ls",           ConListFiles);
 	IConsoleCmdRegister("cd",           ConChangeDirectory);
 	IConsoleCmdRegister("pwd",          ConPrintWorkingDirectory);