diff options
author | Nefertumm <nefertumtg@gmail.com> | 2017-06-30 16:56:29 -0300 |
---|---|---|
committer | Nefertumm <nefertumtg@gmail.com> | 2017-06-30 16:56:29 -0300 |
commit | c599c7e42e8781deaab38ae913cc5e86c1d18446 (patch) | |
tree | f78ed78f0a29b7a0154999b27599dbc99cc4dbbc /src/authserver/Server/AuthSocket.cpp | |
parent | 5015e401f7f0d3ca42aa78aa310195156e388349 (diff) |
Tabs
Diffstat (limited to 'src/authserver/Server/AuthSocket.cpp')
-rw-r--r-- | src/authserver/Server/AuthSocket.cpp | 36 |
1 files changed, 18 insertions, 18 deletions
diff --git a/src/authserver/Server/AuthSocket.cpp b/src/authserver/Server/AuthSocket.cpp index 378de41f1e..6905f3b569 100644 --- a/src/authserver/Server/AuthSocket.cpp +++ b/src/authserver/Server/AuthSocket.cpp @@ -417,32 +417,32 @@ bool AuthSocket::_HandleLogonChallenge() else ;//sLog->outDebug(LOG_FILTER_NETWORKIO, "[AuthChallenge] Account IP matches"); } - else + else { ;//sLog->outDebug(LOG_FILTER_NETWORKIO, "[AuthChallenge] Account '%s' is not locked to ip", _login.c_str()); - std::string accountCountry = fields[3].GetString(); - if (accountCountry.empty() || accountCountry == "00") - ;//sLog->outDebug(LOG_FILTER_NETWORKIO, "[AuthChallenge] Account '%s' is not locked to country", _login.c_str()); - else if (!accountCountry.empty()) + std::string accountCountry = fields[3].GetString(); + if (accountCountry.empty() || accountCountry == "00") + ;//sLog->outDebug(LOG_FILTER_NETWORKIO, "[AuthChallenge] Account '%s' is not locked to country", _login.c_str()); + else if (!accountCountry.empty()) { uint32 ip = inet_addr(ip_address.c_str()); EndianConvertReverse(ip); stmt = LoginDatabase.GetPreparedStatement(LOGIN_SEL_LOGON_COUNTRY); stmt->setUInt32(0, ip); - if (PreparedQueryResult sessionCountryQuery = LoginDatabase.Query(stmt)) - { - std::string loginCountry = (*sessionCountryQuery)[0].GetString(); - ;//sLog->outDebug(LOG_FILTER_NETWORKIO, "[AuthChallenge] Account '%s' is locked to country: '%s' Player country is '%s'", _login.c_str(), accountCountry.c_str(), loginCountry.c_str()); - if (loginCountry != accountCountry) - { - ;//sLog->outDebug(LOG_FILTER_NETWORKIO, "[AuthChallenge] Account country differs."); - pkt << uint8(WOW_FAIL_UNLOCKABLE_LOCK); - locked = true; - } - else - ;//sLog->outDebug(LOG_FILTER_NETWORKIO, "[AuthChallenge] Account country matches"); - } + if (PreparedQueryResult sessionCountryQuery = LoginDatabase.Query(stmt)) + { + std::string loginCountry = (*sessionCountryQuery)[0].GetString(); + ;//sLog->outDebug(LOG_FILTER_NETWORKIO, "[AuthChallenge] Account '%s' is locked to country: '%s' Player country is '%s'", _login.c_str(), accountCountry.c_str(), loginCountry.c_str()); + if (loginCountry != accountCountry) + { + ;//sLog->outDebug(LOG_FILTER_NETWORKIO, "[AuthChallenge] Account country differs."); + pkt << uint8(WOW_FAIL_UNLOCKABLE_LOCK); + locked = true; + } + else + ;//sLog->outDebug(LOG_FILTER_NETWORKIO, "[AuthChallenge] Account country matches"); + } else ;//sLog->outDebug(LOG_FILTER_NETWORKIO, "[AuthChallenge] IP2NATION Table empty"); } |