aboutsummaryrefslogtreecommitdiff
path: root/src/server/game
diff options
context:
space:
mode:
authorRoc13x <roc13x@gmail.com>2018-04-18 18:27:45 +0100
committerShauren <shauren.trinity@gmail.com>2018-04-18 20:27:45 +0300
commit11c3c456b7e135cb749e65d47e39cdc8f267a599 (patch)
tree2afe4910602e4de007f34380d3ebbb081944864b /src/server/game
parentcd5a704fc1629d5f606535b3756195fb311b5ef2 (diff)
Core/Bnet: Improve client ban messages (#21837)
* Don't hide banned game accounts from list. * Display proper ban messages with suspension time remaining. * More appropriate error codes for bans and locks
Diffstat (limited to 'src/server/game')
-rw-r--r--src/server/game/Server/WorldSocket.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/server/game/Server/WorldSocket.cpp b/src/server/game/Server/WorldSocket.cpp
index 95848c9eb7c..d35d5f78298 100644
--- a/src/server/game/Server/WorldSocket.cpp
+++ b/src/server/game/Server/WorldSocket.cpp
@@ -633,8 +633,8 @@ struct AccountInfo
Game.OS = fields[9].GetString();
BattleNet.Id = fields[10].GetUInt32();
Game.Security = AccountTypes(fields[11].GetUInt8());
- BattleNet.IsBanned = fields[12].GetUInt64() != 0;
- Game.IsBanned = fields[13].GetUInt64() != 0;
+ BattleNet.IsBanned = fields[12].GetUInt32() != 0;
+ Game.IsBanned = fields[13].GetUInt32() != 0;
Game.IsRectuiter = fields[14].GetUInt32() != 0;
if (BattleNet.Locale >= TOTAL_LOCALES)
@@ -754,7 +754,7 @@ void WorldSocket::HandleAuthSessionCallback(std::shared_ptr<WorldPackets::Auth::
{
if (account.BattleNet.LastIP != address)
{
- SendAuthResponseError(ERROR_DENIED);
+ SendAuthResponseError(ERROR_RISK_ACCOUNT_LOCKED);
TC_LOG_DEBUG("network", "WorldSocket::HandleAuthSession: Sent Auth Response (Account IP differs. Original IP: %s, new IP: %s).", account.BattleNet.LastIP.c_str(), address.c_str());
// We could log on hook only instead of an additional db log, however action logger is config based. Better keep DB logging as well
sScriptMgr->OnFailedAccountLogin(account.Game.Id);
@@ -766,7 +766,7 @@ void WorldSocket::HandleAuthSessionCallback(std::shared_ptr<WorldPackets::Auth::
{
if (account.BattleNet.LockCountry != _ipCountry)
{
- SendAuthResponseError(ERROR_DENIED);
+ SendAuthResponseError(ERROR_RISK_ACCOUNT_LOCKED);
TC_LOG_DEBUG("network", "WorldSocket::HandleAuthSession: Sent Auth Response (Account country differs. Original country: %s, new country: %s).", account.BattleNet.LockCountry.c_str(), _ipCountry.c_str());
// We could log on hook only instead of an additional db log, however action logger is config based. Better keep DB logging as well
sScriptMgr->OnFailedAccountLogin(account.Game.Id);
@@ -789,7 +789,7 @@ void WorldSocket::HandleAuthSessionCallback(std::shared_ptr<WorldPackets::Auth::
if (account.IsBanned())
{
- SendAuthResponseError(ERROR_DENIED);
+ SendAuthResponseError(ERROR_GAME_ACCOUNT_BANNED);
TC_LOG_ERROR("network", "WorldSocket::HandleAuthSession: Sent Auth Response (Account banned).");
sScriptMgr->OnFailedAccountLogin(account.Game.Id);
DelayedCloseSocket();
@@ -801,7 +801,7 @@ void WorldSocket::HandleAuthSessionCallback(std::shared_ptr<WorldPackets::Auth::
TC_LOG_DEBUG("network", "Allowed Level: %u Player Level %u", allowedAccountType, account.Game.Security);
if (allowedAccountType > SEC_PLAYER && account.Game.Security < allowedAccountType)
{
- SendAuthResponseError(ERROR_DENIED);
+ SendAuthResponseError(ERROR_SERVER_IS_PRIVATE);
TC_LOG_DEBUG("network", "WorldSocket::HandleAuthSession: User tries to login but his security level is not enough");
sScriptMgr->OnFailedAccountLogin(account.Game.Id);
DelayedCloseSocket();