mirror of
https://github.com/azerothcore/mod-anticheat.git
synced 2026-01-13 00:58:35 +00:00
Send world announce on a user kick by AntiCheat.
This commit is contained in:
@@ -81,4 +81,10 @@ Anticheat.KickPlayerFlyHack = 0
|
|||||||
# Default: 0 - (Disabled)
|
# Default: 0 - (Disabled)
|
||||||
# 1 - (Enabled)
|
# 1 - (Enabled)
|
||||||
|
|
||||||
Anticheat.KickPlayerWaterWalkHack = 0
|
Anticheat.KickPlayerWaterWalkHack = 0
|
||||||
|
|
||||||
|
# Anticheat.AnnounceKick
|
||||||
|
# Description: Send a message to all players when a user kicked.
|
||||||
|
# Default: 0 - (Disabled)
|
||||||
|
#
|
||||||
|
Anticheat.AnnounceKick = 1
|
||||||
|
|||||||
@@ -66,6 +66,17 @@ void AnticheatMgr::WalkOnWaterHackDetection(Player* player, MovementInfo moveme
|
|||||||
sLog->outString("AnticheatMgr:: Walk on Water - Hack detected and counteracted by kicking player %s (%u)", player->GetName().c_str(), player->GetGUIDLow());
|
sLog->outString("AnticheatMgr:: Walk on Water - Hack detected and counteracted by kicking player %s (%u)", player->GetName().c_str(), player->GetGUIDLow());
|
||||||
|
|
||||||
player->GetSession()->KickPlayer(true);
|
player->GetSession()->KickPlayer(true);
|
||||||
|
if(sConfigMgr->GetBoolDefault("Anticheat.AnnounceKick", true))
|
||||||
|
{
|
||||||
|
std::string plr = player->GetName();
|
||||||
|
std::string tag_colour = "7bbef7";
|
||||||
|
std::string plr_colour = "ff0000";
|
||||||
|
std::ostringstream stream;
|
||||||
|
stream << "|CFF" << plr_colour << "[AntiCheat]|r|CFF" << tag_colour <<
|
||||||
|
" Player |r|cff" << plr_colour << plr << "|r|cff" << tag_colour <<
|
||||||
|
" has been kicked.|r";
|
||||||
|
sWorld->SendServerMessage(SERVER_MSG_STRING, stream.str().c_str());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else if (sConfigMgr->GetBoolDefault("Anticheat.WriteLog", false)) {
|
else if (sConfigMgr->GetBoolDefault("Anticheat.WriteLog", false)) {
|
||||||
sLog->outString("AnticheatMgr:: Walk on Water - Hack detected player %s (%u)", player->GetName().c_str(), player->GetGUIDLow());
|
sLog->outString("AnticheatMgr:: Walk on Water - Hack detected player %s (%u)", player->GetName().c_str(), player->GetGUIDLow());
|
||||||
@@ -97,6 +108,17 @@ void AnticheatMgr::FlyHackDetection(Player* player, MovementInfo movementInfo)
|
|||||||
sLog->outString("AnticheatMgr:: Fly-Hack detected and counteracted by kicking player %s (%u)", player->GetName().c_str(), player->GetGUIDLow());
|
sLog->outString("AnticheatMgr:: Fly-Hack detected and counteracted by kicking player %s (%u)", player->GetName().c_str(), player->GetGUIDLow());
|
||||||
|
|
||||||
player->GetSession()->KickPlayer(true);
|
player->GetSession()->KickPlayer(true);
|
||||||
|
if(sConfigMgr->GetBoolDefault("Anticheat.AnnounceKick", true))
|
||||||
|
{
|
||||||
|
std::string plr = player->GetName();
|
||||||
|
std::string tag_colour = "7bbef7";
|
||||||
|
std::string plr_colour = "ff0000";
|
||||||
|
std::ostringstream stream;
|
||||||
|
stream << "|CFF" << plr_colour << "[AntiCheat]|r|CFF" << tag_colour <<
|
||||||
|
" Player |r|cff" << plr_colour << plr << "|r|cff" << tag_colour <<
|
||||||
|
" has been kicked.|r";
|
||||||
|
sWorld->SendServerMessage(SERVER_MSG_STRING, stream.str().c_str());
|
||||||
|
}
|
||||||
} else if (sConfigMgr->GetBoolDefault("Anticheat.WriteLog", false)) {
|
} else if (sConfigMgr->GetBoolDefault("Anticheat.WriteLog", false)) {
|
||||||
sLog->outString( "AnticheatMgr:: Fly-Hack detected player %s (%u)", player->GetName().c_str(), player->GetGUIDLow());
|
sLog->outString( "AnticheatMgr:: Fly-Hack detected player %s (%u)", player->GetName().c_str(), player->GetGUIDLow());
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user