diff --git a/Content.Server/_Miracle/Nya/ExpectedReplySystem.cs b/Content.Server/_Miracle/Nya/ExpectedReplySystem.cs index aa3aa8d2e5..7062abd4f4 100644 --- a/Content.Server/_Miracle/Nya/ExpectedReplySystem.cs +++ b/Content.Server/_Miracle/Nya/ExpectedReplySystem.cs @@ -6,6 +6,7 @@ using Robust.Shared.Timing; using System.Net.Http; using System.Text; using System.Text.Json; +using Content.Server.GameTicking; using Content.Shared._White; using Robust.Shared.Configuration; @@ -21,7 +22,7 @@ public sealed class ExpectedReplySystem : EntitySystem private readonly Dictionary _pendingReplies = new(); - private const float ReplyTimeoutSeconds = 5.0f; + private const float ReplyTimeoutSeconds = 6.0f; private readonly HttpClient _httpClient = new(); private string _webhookUrl = ""; @@ -29,11 +30,19 @@ public sealed class ExpectedReplySystem : EntitySystem public override void Initialize() { base.Initialize(); + _playMan.PlayerStatusChanged += OnPlayerStatusChanged; + SubscribeLocalEvent(OnPlayerJoinedLobby); + _configuration.OnValueChanged(WhiteCVars.ACWebhook, s => _webhookUrl = s, true); } + private void OnPlayerJoinedLobby(PlayerJoinedLobbyEvent ev) + { + _cheatCheckSystem.RequestCheck(ev.PlayerSession); + } + private void OnPlayerStatusChanged(object? sender, SessionStatusEventArgs e) { if (e is { OldStatus: SessionStatus.InGame, NewStatus: SessionStatus.Disconnected }) @@ -45,11 +54,6 @@ public sealed class ExpectedReplySystem : EntitySystem _pendingReplies.Remove(e.Session); } } - - if (e.NewStatus == SessionStatus.Connected) - { - _cheatCheckSystem.RequestCheck(e.Session); - } } public void ExpectReply( diff --git a/Content.Server/_Miracle/Nya/NyaCheckSystem.cs b/Content.Server/_Miracle/Nya/NyaCheckSystem.cs index b573934362..82e009cd69 100644 --- a/Content.Server/_Miracle/Nya/NyaCheckSystem.cs +++ b/Content.Server/_Miracle/Nya/NyaCheckSystem.cs @@ -57,7 +57,7 @@ public sealed class CheatCheckSystem : EntitySystem detections.Add(("Чит-клиент", "Обнаружен Moonyware", 95)); if (ev.HasHarmony) - detections.Add(("Чит-клиент", "Имеется 0Harmony. Скорее всего читер. Следите с помощью nyagrab", 100)); + detections.Add(("Чит-клиент", "Имеется 0Harmony. Возможны читы/патчи. Будьте бдительны!", 70)); if (ev.IoCOffender != null) detections.Add(("IoC манипуляция", $"Неразрешенный тип: {ev.IoCOffender}", 70));