From 8da56641eb58c8572b18f249d4088f94e04c35fa Mon Sep 17 00:00:00 2001 From: Marko Lindqvist Date: Thu, 7 Jul 2022 00:51:22 +0300 Subject: [PATCH 49/49] Prohibit changing ruleset given from commandline See osdn #45042 Signed-off-by: Marko Lindqvist --- server/stdinhand.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/server/stdinhand.c b/server/stdinhand.c index ead9c7c769..245da94844 100644 --- a/server/stdinhand.c +++ b/server/stdinhand.c @@ -3918,6 +3918,14 @@ bool set_rulesetdir(struct connection *caller, const char *str, bool check, "see what is the current ruleset.")); return FALSE; } + + if (srvarg.ruleset != NULL) { + cmd_reply(CMD_RULESETDIR, caller, C_FAIL, + _("Changing ruleset not allowed. It was locked from the commandline.")); + + return FALSE; + } + if (game_was_started() || !map_is_empty()) { cmd_reply(CMD_RULESETDIR, caller, C_FAIL, _("This setting can't be modified after the game has started.")); -- 2.35.1