Base game doesn't have a specific message for it so it results in a generic "left the game due to error" but it's still better than the default "left the game".
This also allows client side mods to fix the message.
_logger.LogWarning("Client {Name} ({Id}) was caught cheating: [{SupportCode}] [{Context}-{Category}] {Message}", Name, Id, supportCode, context.Name, category, message);
- if (_antiCheatConfig.BanIpFromGame)
+ if (Player is { } player)
{
- Player?.Game.BanIp(Connection.EndPoint.Address);
+ if (_antiCheatConfig.BanIpFromGame)
+ {
+ player.Game.BanIp(Connection.EndPoint.Address);
+ }
+
+ await player.Game.HandleRemovePlayer(Id, DisconnectReason.Hacking);
}
var disconnectMessage =