v1.3.0.1 (Epic Store release)

This commit is contained in:
Regalis11
2024-03-28 18:34:33 +02:00
parent 81ca8637be
commit 3791670c42
269 changed files with 13160 additions and 2966 deletions
@@ -174,6 +174,22 @@ namespace Barotrauma.Networking
return bannedPlayer != null;
}
public bool IsBanned(AccountInfo accountInfo, out string reason)
{
if (accountInfo.AccountId.TryUnwrap(out var accountId) && IsBanned(accountId, out reason))
{
return true;
}
foreach (var otherId in accountInfo.OtherMatchingIds)
{
if (IsBanned(otherId, out reason)) { return true; }
}
reason = "";
return false;
}
public void BanPlayer(string name, Endpoint endpoint, string reason, TimeSpan? duration)
=> BanPlayer(name, endpoint.Address, reason, duration);
@@ -305,7 +321,7 @@ namespace Barotrauma.Networking
else
{
outMsg.WriteBoolean(false); outMsg.WritePadBits();
outMsg.WriteString(((SteamId)bannedPlayer.AddressOrAccountId).StringRepresentation);
outMsg.WriteString(((AccountId)bannedPlayer.AddressOrAccountId).StringRepresentation);
}
}
}