From 4a9ad55d14f5ad5e3d158e5aa242fa79cbfc1d99 Mon Sep 17 00:00:00 2001 From: MrMaho Date: Fri, 2 Oct 2026 17:52:32 +0200 Subject: [PATCH] In-game admin menu can grant and remove admin rights (2.9.4) AdminAction 9/10 (admins only) runs op/deop for the target player, same as the console and the web panel. Co-Authored-By: Claude Opus 5.5 --- GameServer.cs | 6 ++++++ MSCO.Server.csproj | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/GameServer.cs b/GameServer.cs index eb405eb..65f5f68 100644 --- a/GameServer.cs +++ b/GameServer.cs @@ -435,6 +435,12 @@ public sealed class GameServer result = SetResetPoint() ? "The current save game is now the reset point" : "No save game to use as reset point"; if (result.StartsWith("The")) Log($"{c.Name} set the current save game as the reset point"); } + else if (action == 9 || action == 10) + { + // Admin geben / nehmen aus dem Admin-MenĂ¼ im Spiel (wie "op"/"deop" in der Konsole bzw. im Panel) + result = PanelSetAdmin(targetId, action == 9, c.Name); + if (string.IsNullOrWhiteSpace(result)) result = action == 9 ? "Done - the player is now an admin" : "Done - the player is no longer an admin"; + } else if (!clients.TryGetValue(targetId, out var target) || target.State != ClientState.Joined) result = "Player not found"; else if (action == 3) { diff --git a/MSCO.Server.csproj b/MSCO.Server.csproj index 67cb528..3328808 100644 --- a/MSCO.Server.csproj +++ b/MSCO.Server.csproj @@ -7,7 +7,7 @@ enable MSCO.Server MSCO.Server - 2.9.3 + 2.9.4 MBM MSCO Dedicated Server true