From 4ad4949856be9a283237741bed8decbfda10c71b Mon Sep 17 00:00:00 2001 From: HitPanda <104197232+EnefFlow@users.noreply.github.com> Date: Tue, 16 May 2023 16:55:41 +0300 Subject: [PATCH] [Tweak] unban server check (#69) --- .../UtkaIntegration/Commands/UtkaUnbanCommand.cs | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/Content.Server/UtkaIntegration/Commands/UtkaUnbanCommand.cs b/Content.Server/UtkaIntegration/Commands/UtkaUnbanCommand.cs index 3d2476f1f6..5e24a8fd3f 100644 --- a/Content.Server/UtkaIntegration/Commands/UtkaUnbanCommand.cs +++ b/Content.Server/UtkaIntegration/Commands/UtkaUnbanCommand.cs @@ -34,6 +34,13 @@ public sealed class UtkaUnbanCommand : IUtkaCommand return; } + var adminData = await dbMan.GetAdminDataForAsync(player); + if (adminData?.AdminServer == null || ban.ServerName != "unknown" && adminData.AdminServer != ban.ServerName) + { + UtkaSendResponse(false); + return; + } + await dbMan.AddServerUnbanAsync(new ServerUnbanDef(banId, player, DateTimeOffset.Now)); UtkaSendResponse(true);