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";
|
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");
|
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 (!clients.TryGetValue(targetId, out var target) || target.State != ClientState.Joined) result = "Player not found";
|
||||||
else if (action == 3)
|
else if (action == 3)
|
||||||
{
|
{
|
||||||
|
|||||||
+1
-1
@@ -7,7 +7,7 @@
|
|||||||
<ImplicitUsings>enable</ImplicitUsings>
|
<ImplicitUsings>enable</ImplicitUsings>
|
||||||
<RootNamespace>MSCO.Server</RootNamespace>
|
<RootNamespace>MSCO.Server</RootNamespace>
|
||||||
<AssemblyName>MSCO.Server</AssemblyName>
|
<AssemblyName>MSCO.Server</AssemblyName>
|
||||||
<Version>2.9.3</Version>
|
<Version>2.9.4</Version>
|
||||||
<Company>MBM</Company>
|
<Company>MBM</Company>
|
||||||
<Product>MSCO Dedicated Server</Product>
|
<Product>MSCO Dedicated Server</Product>
|
||||||
<InvariantGlobalization>true</InvariantGlobalization>
|
<InvariantGlobalization>true</InvariantGlobalization>
|
||||||
|
|||||||
Reference in New Issue
Block a user