Admin menu: make admin / remove admin for players on dedicated servers
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -561,6 +561,18 @@ namespace MSCO
|
||||
SendGame(MsgType.Chat, NetSession.Build(w => w.Write("* " + text)));
|
||||
}
|
||||
|
||||
/// <summary>Admin (dedizierter Server): einem Spieler Admin-Rechte geben (9) bzw. nehmen (10).</summary>
|
||||
public void SetAdmin(int playerId, bool admin)
|
||||
{
|
||||
if (session == null || !dedicated) return;
|
||||
session.SendTo(NetSession.HostId, MsgType.AdminAction, NetSession.Build(w =>
|
||||
{
|
||||
w.Write((byte)(admin ? 9 : 10));
|
||||
w.Write(playerId);
|
||||
w.Write("");
|
||||
}));
|
||||
}
|
||||
|
||||
public void AdminAction(bool ban, int playerId, string reason)
|
||||
{
|
||||
if (session == null) return;
|
||||
|
||||
Reference in New Issue
Block a user