From cec07307bf2c30f9dde27eb4a905cd1bd0973a94 Mon Sep 17 00:00:00 2001 From: Deserty0 Date: Wed, 13 Aug 2025 04:48:48 +1000 Subject: [PATCH] 123 --- Content.Server/_CP14/Discord/DiscordAuthManager.cs | 9 +++++++-- Content.Server/_CP14/JoinQueue/JoinQueueManager.cs | 2 +- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/Content.Server/_CP14/Discord/DiscordAuthManager.cs b/Content.Server/_CP14/Discord/DiscordAuthManager.cs index f2d871def4..956bc9b102 100644 --- a/Content.Server/_CP14/Discord/DiscordAuthManager.cs +++ b/Content.Server/_CP14/Discord/DiscordAuthManager.cs @@ -9,6 +9,7 @@ using System.Threading.Tasks; using Content.Server.Database; using Content.Shared._CP14.Discord; using Content.Shared.CCVar; +using NetCord; using Robust.Server.Player; using Robust.Shared.Configuration; using Robust.Shared.Enums; @@ -137,6 +138,7 @@ public sealed class DiscordAuthManager var isWhitelisted = await _db.GetWhitelistStatusAsync(userId); if (isWhitelisted) { + _sawmill.Debug($"{userId} is whitelisted, Verified"); return new AuthData { Verified = true }; } @@ -150,6 +152,7 @@ public sealed class DiscordAuthManager { if (_blockedGuilds.Contains(guild.Id)) { + _sawmill.Debug($"{userId} exist in blocked guild {guild.Id}, Suspicious"); isSuspicious = true; break; } @@ -170,6 +173,7 @@ public sealed class DiscordAuthManager var accountAge = GetAccountAge(user.Id); if (accountAge < 45) { + _sawmill.Debug($"{userId} have account age lower than 45 days, Suspicious"); isSuspicious = true; } @@ -190,14 +194,15 @@ public sealed class DiscordAuthManager errorMessage = _panicBunkerCustomReason; } } - + _sawmill.Debug($"{userId} is suspicious, warning level medium and panic bunker enabled, Not Verified"); return new AuthData { Verified = false, ErrorMessage = errorMessage }; } - + _sawmill.Debug($"{userId} is suspicious, warning level medium but panic bunker disabled, Verified"); break; } case "high": { + _sawmill.Debug($"{userId} is suspicious and warning level high, Not Verified"); return new AuthData { Verified = false, diff --git a/Content.Server/_CP14/JoinQueue/JoinQueueManager.cs b/Content.Server/_CP14/JoinQueue/JoinQueueManager.cs index 9558fec0c5..b43f72d2f9 100644 --- a/Content.Server/_CP14/JoinQueue/JoinQueueManager.cs +++ b/Content.Server/_CP14/JoinQueue/JoinQueueManager.cs @@ -173,7 +173,7 @@ public sealed class JoinQueueManager { Timer.Spawn(0, () => _playerManager.JoinGame(s)); // Suspicious account warning - if (_suspiciousAccountWarningLevel != "disabled") + if (_suspiciousAccountWarningLevel.ToLower() != "disabled") { _chatManager.SendAdminAnnouncement(Loc.GetString("cp14-suspicious-player-join-message", ("name", s.Name))); }