Core/Warden: Fixed a crash when Warden.ClientCheckFailAction was set to ban in the config, and Warden::Penalty was called in a context where check is NULL
closes #6736
This commit is contained in:
@@ -188,7 +188,11 @@ std::string Warden::Penalty(WardenCheck* check /*= NULL*/)
|
|||||||
std::string accountName;
|
std::string accountName;
|
||||||
AccountMgr::GetName(_session->GetAccountId(), accountName);
|
AccountMgr::GetName(_session->GetAccountId(), accountName);
|
||||||
std::stringstream banReason;
|
std::stringstream banReason;
|
||||||
banReason << "Warden Anticheat Violation: " << check->Comment << " (CheckId: " << check->CheckId << ")";
|
banReason << "Warden Anticheat Violation";
|
||||||
|
// Check can be NULL, for example if the client sent a wrong signature in the warden packet (CHECKSUM FAIL)
|
||||||
|
if (check)
|
||||||
|
banReason << ": " << check->Comment << " (CheckId: " << check->CheckId << ")";
|
||||||
|
|
||||||
sWorld->BanAccount(BAN_ACCOUNT, accountName, duration.str(), banReason.str(),"Server");
|
sWorld->BanAccount(BAN_ACCOUNT, accountName, duration.str(), banReason.str(),"Server");
|
||||||
|
|
||||||
return "Ban";
|
return "Ban";
|
||||||
|
|||||||
Reference in New Issue
Block a user