Panel: unticking 'web panel enabled' + restart panel really turns it off (2.9.5)

The restart used to refuse when the panel was disabled, so it stayed
reachable. Now it stops the panel (also the relay on the game port);
'panel on|off' in the console turns it on/off and saves server.json.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-10-02 21:07:18 +02:00
co-authored by Claude Opus 5.5
parent 905d191807
commit 835d3ce998
6 changed files with 67 additions and 6 deletions
+4 -2
View File
@@ -1012,8 +1012,10 @@ public sealed class GameServer
SaveWorld();
break;
case "panel":
if (Panel != null) Panel.PrintInfo();
else Log("The web panel is disabled (PanelEnabled in server.json)");
if (args.Length > 1 && (args[1] == "on" || args[1] == "off") && Host != null)
Log(Host.SetPanelEnabled(args[1] == "on", "Console"));
else if (Panel != null) Panel.PrintInfo();
else Log("The web panel is disabled - 'panel on' turns it on");
break;
case "reset-world":
ResetWorld("Console");