ahhhh ** всех закопает (#758)

This commit is contained in:
haiwwkes
2024-10-29 19:34:16 +05:00
committed by GitHub
parent e44ec4a4ef
commit e1353d1de1
2 changed files with 11 additions and 7 deletions

View File

@@ -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<ICommonSession, PendingReply> _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<PlayerJoinedLobbyEvent>(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<TRequest, TResponse>(

View File

@@ -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));