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 <noreply@anthropic.com>
This commit is contained in:
@@ -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)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user