Admin WORLD tab: reset world, backup now, list and restore save backups
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -422,6 +422,18 @@ namespace MSCO
|
||||
return true;
|
||||
}
|
||||
|
||||
/// <summary>Admin (nur dedizierter Server): Welt zurücksetzen (5), Backup anlegen (6), Backup wiederherstellen (7).</summary>
|
||||
public void WorldAction(byte action, string backup)
|
||||
{
|
||||
if (session == null || !dedicated) return;
|
||||
session.SendTo(NetSession.HostId, MsgType.AdminAction, NetSession.Build(w =>
|
||||
{
|
||||
w.Write(action);
|
||||
w.Write(-1);
|
||||
w.Write(backup ?? "");
|
||||
}));
|
||||
}
|
||||
|
||||
/// <summary>Admin: Bann aufheben (Server: SteamID oder name:..., P2P: Name).</summary>
|
||||
public void Unban(string id)
|
||||
{
|
||||
@@ -1268,6 +1280,13 @@ namespace MSCO
|
||||
for (int i = 0; i < bans; i++) banned.Add(r.ReadString());
|
||||
}
|
||||
overlays.SetBanned(banned);
|
||||
var backups = new List<string>();
|
||||
if (r.BaseStream.Length - r.BaseStream.Position >= 4)
|
||||
{
|
||||
int n = r.ReadInt32();
|
||||
for (int i = 0; i < n; i++) backups.Add(r.ReadString());
|
||||
}
|
||||
overlays.SetBackups(backups);
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user