console_cmds.c
changeset 4600 c3d1ca65a598
parent 4585 16d114f6e35d
child 4614 82d41ead0e22
--- a/console_cmds.c	Thu Sep 14 20:40:59 2006 +0000
+++ b/console_cmds.c	Thu Sep 14 23:26:58 2006 +0000
@@ -1373,7 +1373,12 @@
 		IConsoleGetPatchSetting(argv[1]);
 	} else {
 		uint32 val;
-		if (GetArgumentInteger(&val, argv[2])) IConsoleSetPatchSetting(argv[1], val);
+
+		if (GetArgumentInteger(&val, argv[2])) {
+			if (!IConsoleSetPatchSetting(argv[1], val)) {
+				IConsoleError("This command/variable is only available to a network server.");
+			}
+		}
 	}
 
 	return true;
@@ -1459,6 +1464,7 @@
 	IConsoleCmdRegister("cd",           ConChangeDirectory);
 	IConsoleCmdRegister("pwd",          ConPrintWorkingDirectory);
 	IConsoleCmdRegister("clear",        ConClearBuffer);
+	IConsoleCmdRegister("patch",        ConPatch);
 
 	IConsoleAliasRegister("dir",      "ls");
 	IConsoleAliasRegister("del",      "rm %+");
@@ -1514,8 +1520,6 @@
 	IConsoleCmdRegister("unpause",         ConUnPauseGame);
 	IConsoleCmdHookAdd("unpause",          ICONSOLE_HOOK_ACCESS, ConHookServerOnly);
 
-	IConsoleCmdRegister("patch",           ConPatch);
-
 	/*** Networking variables ***/
 	IConsoleVarRegister("net_frame_freq",        &_network_frame_freq, ICONSOLE_VAR_BYTE, "The amount of frames before a command will be (visibly) executed. Default value: 1");
 	IConsoleVarHookAdd("net_frame_freq",         ICONSOLE_HOOK_ACCESS, ConHookServerOnly);