diff --git a/src/AnticheatMgr.cpp b/src/AnticheatMgr.cpp index 7ab6da7..9d23dac 100644 --- a/src/AnticheatMgr.cpp +++ b/src/AnticheatMgr.cpp @@ -39,7 +39,7 @@ void AnticheatMgr::JumpHackDetection(Player* player, MovementInfo /* movementInf if (m_Players[key].GetLastOpcode() == MSG_MOVE_JUMP && opcode == MSG_MOVE_JUMP) { BuildReport(player, JUMP_HACK_REPORT); - sLog->outString("AnticheatMgr:: Jump-Hack detected player %s (%s)", player->GetName().c_str(), player->GetGUID().ToString().c_str()); + LOG_INFO("module", "AnticheatMgr:: Jump-Hack detected player {} ({})", player->GetName(), player->GetGUID().ToString()); } } @@ -64,7 +64,7 @@ void AnticheatMgr::WalkOnWaterHackDetection(Player* player, MovementInfo moveme if (sConfigMgr->GetOption("Anticheat.KickPlayerWaterWalkHack", false)) { if (sConfigMgr->GetOption("Anticheat.WriteLog", false)) - sLog->outString("AnticheatMgr:: Walk on Water - Hack detected and counteracted by kicking player %s (%s)", player->GetName().c_str(), player->GetGUID().ToString().c_str()); + LOG_INFO("module", "AnticheatMgr:: Walk on Water - Hack detected and counteracted by kicking player {} ({})", player->GetName(), player->GetGUID().ToString()); player->GetSession()->KickPlayer(true); if(sConfigMgr->GetOption("Anticheat.AnnounceKick", true)) @@ -80,7 +80,7 @@ void AnticheatMgr::WalkOnWaterHackDetection(Player* player, MovementInfo moveme } } else if (sConfigMgr->GetOption("Anticheat.WriteLog", false)) { - sLog->outString("AnticheatMgr:: Walk on Water - Hack detected player %s (%s)", player->GetName().c_str(), player->GetGUID().ToString().c_str()); + LOG_INFO("module", "AnticheatMgr:: Walk on Water - Hack detected player {} ({})", player->GetName(), player->GetGUID().ToString()); } BuildReport(player, WALK_WATER_HACK_REPORT); @@ -114,7 +114,7 @@ void AnticheatMgr::FlyHackDetection(Player* player, MovementInfo movementInfo) { if (sConfigMgr->GetOption("Anticheat.WriteLog", false)) { - sLog->outString("AnticheatMgr:: Fly-Hack detected and counteracted by kicking player %s (%s)", player->GetName().c_str(), player->GetGUID().ToString().c_str()); + LOG_INFO("module", "AnticheatMgr:: Fly-Hack detected and counteracted by kicking player {} ({})", player->GetName(), player->GetGUID().ToString()); } player->GetSession()->KickPlayer(true); @@ -129,10 +129,11 @@ void AnticheatMgr::FlyHackDetection(Player* player, MovementInfo movementInfo) " has been kicked.|r"; sWorld->SendServerMessage(SERVER_MSG_STRING, stream.str().c_str()); } - } else if (sConfigMgr->GetOption("Anticheat.WriteLog", false)) - { - sLog->outString( "AnticheatMgr:: Fly-Hack detected player %s (%s)", player->GetName().c_str(), player->GetGUID().ToString().c_str()); - } + } + else if (sConfigMgr->GetOption("Anticheat.WriteLog", false)) + { + LOG_INFO("module", "AnticheatMgr:: Fly-Hack detected player {} ({})", player->GetName(), player->GetGUID().ToString()); + } BuildReport(player,FLY_HACK_REPORT); } @@ -163,7 +164,7 @@ void AnticheatMgr::TeleportPlaneHackDetection(Player* player, MovementInfo movem if (z_diff > 1.0f) { if (sConfigMgr->GetOption("Anticheat.WriteLog", false)) - sLog->outString("AnticheatMgr:: Teleport To Plane - Hack detected player %s (%s)", player->GetName().c_str(), player->GetGUID().ToString().c_str()); + LOG_INFO("module", "AnticheatMgr:: Teleport To Plane - Hack detected player {} ({})", player->GetName(), player->GetGUID().ToString()); BuildReport(player, TELEPORT_PLANE_HACK_REPORT); } @@ -226,7 +227,7 @@ void AnticheatMgr::ClimbHackDetection(Player *player, MovementInfo movementInfo, if (angle > CLIMB_ANGLE) { if (sConfigMgr->GetOption("Anticheat.WriteLog", false)) - sLog->outString("AnticheatMgr:: Climb-Hack detected player %s (%s)", player->GetName().c_str(), player->GetGUID().ToString().c_str()); + LOG_INFO("module", "AnticheatMgr:: Climb-Hack detected player {} ({})", player->GetName(), player->GetGUID().ToString()); BuildReport(player, CLIMB_HACK_REPORT); } @@ -275,7 +276,7 @@ void AnticheatMgr::SpeedHackDetection(Player* player, MovementInfo movementInfo) if (clientSpeedRate > speedRate) { if (sConfigMgr->GetOption("Anticheat.WriteLog", false)) - sLog->outString("AnticheatMgr:: Speed-Hack detected player %s (%s)", player->GetName().c_str(), player->GetGUID().ToString().c_str()); + LOG_INFO("module", "AnticheatMgr:: Speed-Hack detected player {} ({})", player->GetName(), player->GetGUID().ToString()); BuildReport(player, SPEED_HACK_REPORT); } diff --git a/src/AnticheatScripts.cpp b/src/AnticheatScripts.cpp index 860fe10..47db4ba 100644 --- a/src/AnticheatScripts.cpp +++ b/src/AnticheatScripts.cpp @@ -58,14 +58,14 @@ public: LOG_INFO("module", "Anticheat: Resetting daily report states."); sAnticheatMgr->ResetDailyReportStates(); UpdateReportResetTime(); - FMT_LOG_INFO("module", "Anticheat: Next daily report reset: {}", Acore::Time::TimeToHumanReadable(resetTime)); + LOG_INFO("module", "Anticheat: Next daily report reset: {}", Acore::Time::TimeToHumanReadable(resetTime)); } if (GameTime::GetUptime() > lastIterationPlayer) { lastIterationPlayer = GameTime::GetUptime() + Seconds(sConfigMgr->GetOption("Anticheat.SaveReportsTime", 60)); - FMT_LOG_INFO("module", "Saving reports for {} players.", sWorld->GetPlayerCount()); + LOG_INFO("module", "Saving reports for {} players.", sWorld->GetPlayerCount()); for (SessionMap::const_iterator itr = sWorld->GetAllSessions().begin(); itr != sWorld->GetAllSessions().end(); ++itr) if (Player* plr = itr->second->GetPlayer())