From 99b3157536b99ee3b2ccbf66c72dd9603b94db87 Mon Sep 17 00:00:00 2001 From: M'Dic Date: Sun, 11 Sep 2022 14:34:52 -0400 Subject: [PATCH] feat (logging): Log Time Manipulation Speed Hack added logging to time manipulation speed hack. --- src/AnticheatMgr.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/AnticheatMgr.cpp b/src/AnticheatMgr.cpp index 7d6f78c..8edc50f 100644 --- a/src/AnticheatMgr.cpp +++ b/src/AnticheatMgr.cpp @@ -205,6 +205,13 @@ void AnticheatMgr::SpeedHackDetection(Player* player, MovementInfo movementInfo) if (int32(timeDiff) < 0) { + if (sConfigMgr->GetOption("Anticheat.WriteLog", true)) + { + uint32 latency = 0; + latency = player->GetSession()->GetLatency(); + std::string goXYZ = ".go xyz " + std::to_string(player->GetPositionX()) + " " + std::to_string(player->GetPositionY()) + " " + std::to_string(player->GetPositionZ() + 1.0f) + " " + std::to_string(player->GetMap()->GetId()) + " " + std::to_string(player->GetOrientation()); + LOG_INFO("anticheat.module", "AnticheatMgr:: Time Manipulation - Hack detected player {} ({}) - Latency: {} ms - IP: {} - Cheat Flagged At: {}", player->GetName(), player->GetGUID().ToString(), latency, player->GetSession()->GetRemoteAddress().c_str(), goXYZ); + } BuildReport(player, SPEED_HACK_REPORT); timeDiff = 1; }