[feat] Разделение банов по серверам.

# Conflicts:
#	Content.Client/Administration/UI/BanList/BanListLine.xaml.cs
#	Content.Client/Administration/UI/BanList/Bans/BanListHeader.xaml
#	Content.Client/Administration/UI/BanList/Bans/BanListLine.xaml
#	Content.Client/Administration/UI/Tabs/AdminTab/BanWindow.xaml
#	Content.Client/Administration/UI/Tabs/AdminTab/BanWindow.xaml.cs
#	Content.IntegrationTests/Tests/Commands/PardonCommand.cs
#	Content.Server/Administration/Commands/BanCommand.cs
#	Content.Server/Administration/Commands/DepartmentBanCommand.cs
#	Content.Server/Administration/Commands/RoleBanCommand.cs
#	Content.Server/Administration/Managers/RoleBanManager.cs
#	Content.Server/Database/ServerDbManager.cs
#	Content.Server/Database/ServerDbPostgres.cs
#	Content.Server/Database/ServerDbSqlite.cs
This commit is contained in:
rhailrake
2023-04-30 14:27:27 +06:00
committed by Remuchi
parent 8bd6754472
commit 977e075086
42 changed files with 5825 additions and 328 deletions

View File

@@ -13,5 +13,6 @@ public record SharedServerBan(
DateTime? ExpirationTime,
string Reason,
string? BanningAdminName,
SharedServerUnban? Unban
SharedServerUnban? Unban,
string ServerName
);

View File

@@ -14,5 +14,6 @@ public sealed record SharedServerRoleBan(
string Reason,
string? BanningAdminName,
SharedServerUnban? Unban,
string Role
) : SharedServerBan(Id, UserId, Address, HWId, BanTime, ExpirationTime, Reason, BanningAdminName, Unban);
string Role,
string ServerName
) : SharedServerBan(Id, UserId, Address, HWId, BanTime, ExpirationTime, Reason, BanningAdminName, Unban, ServerName);

View File

@@ -29,12 +29,12 @@ public static class BanPanelEuiStateMsg
public uint Minutes { get; set; }
public string Reason { get; set; }
public NoteSeverity Severity { get; set; }
public string[]? Roles { get; set; }
public bool UseLastIp { get; set; }
public bool UseLastHwid { get; set; }
public bool Erase { get; set; }
public bool IsGlobalBan { get; set; }
public CreateBanRequest(string? player, (IPAddress, int)? ipAddress, bool useLastIp, byte[]? hwid, bool useLastHwid, uint minutes, string reason, NoteSeverity severity, string[]? roles, bool erase)
public CreateBanRequest(string? player, (IPAddress, int)? ipAddress, bool useLastIp, byte[]? hwid, bool useLastHwid, uint minutes, string reason, NoteSeverity severity, bool erase, bool isGlobalBan)
{
Player = player;
IpAddress = ipAddress == null ? null : $"{ipAddress.Value.Item1}/{ipAddress.Value.Item2}";
@@ -44,8 +44,8 @@ public static class BanPanelEuiStateMsg
Minutes = minutes;
Reason = reason;
Severity = severity;
Roles = roles;
Erase = erase;
IsGlobalBan = isGlobalBan;
}
}

View File

@@ -21,6 +21,7 @@ namespace Content.Shared.Administration
public AdminFlags PosFlags;
public AdminFlags NegFlags;
public int? RankId;
public string? AdminServer;
}
[Serializable, NetSerializable]
@@ -41,6 +42,7 @@ namespace Content.Shared.Administration
public AdminFlags PosFlags;
public AdminFlags NegFlags;
public int? RankId;
public string? AdminServer;
}
[Serializable, NetSerializable]
@@ -57,6 +59,7 @@ namespace Content.Shared.Administration
public AdminFlags PosFlags;
public AdminFlags NegFlags;
public int? RankId;
public string? AdminServer;
}