summaryrefslogtreecommitdiff
path: root/console_cmds.c
diff options
context:
space:
mode:
Diffstat (limited to 'console_cmds.c')
-rw-r--r--console_cmds.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/console_cmds.c b/console_cmds.c
index 5543ccb8d..8a44054e3 100644
--- a/console_cmds.c
+++ b/console_cmds.c
@@ -1373,7 +1373,12 @@ DEF_CONSOLE_CMD(ConPatch)
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 @@ void IConsoleStdLibRegister(void)
IConsoleCmdRegister("cd", ConChangeDirectory);
IConsoleCmdRegister("pwd", ConPrintWorkingDirectory);
IConsoleCmdRegister("clear", ConClearBuffer);
+ IConsoleCmdRegister("patch", ConPatch);
IConsoleAliasRegister("dir", "ls");
IConsoleAliasRegister("del", "rm %+");
@@ -1514,8 +1520,6 @@ void IConsoleStdLibRegister(void)
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);