2.10.6: security level 1 - reported in heartbeat, server info and Welcome; log warning when the keymaster marks the server outdated
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -53,6 +53,17 @@ try
|
||||
Check(alice.AdminStatus == false, "Alice is not admin");
|
||||
Check(alice.SaveFiles == 5, "Alice received save files (" + alice.SaveFiles + ")");
|
||||
Check(alice.GotStartGame, "Alice got StartGame");
|
||||
{
|
||||
// Welcome endet mit Sicherheitsstufe + Version (aktuelle Mods verlassen veraltete Server)
|
||||
using var welcome = new BinaryReader(new MemoryStream(alice.Welcome));
|
||||
welcome.ReadInt32(); welcome.ReadBoolean();
|
||||
int others = welcome.ReadInt32();
|
||||
for (int i = 0; i < others; i++) { welcome.ReadInt32(); welcome.ReadString(); }
|
||||
int level = welcome.ReadInt32();
|
||||
string serverVersion = welcome.ReadString();
|
||||
Check(level == GameServer.SecurityLevel && level >= 1 && serverVersion == Updater.CurrentVersion,
|
||||
$"Welcome reports security level {level} and server version {serverVersion}");
|
||||
}
|
||||
|
||||
Console.WriteLine("== Ping");
|
||||
alice.Send(MsgType.Ping, BitConverter.GetBytes(12.5f));
|
||||
|
||||
Reference in New Issue
Block a user