Core/Misc: Improved ip2location code and set it to disabled by default

(cherry picked from commit 0ead73516a)
This commit is contained in:
Shauren
2018-06-23 21:31:09 +02:00
parent 61532e9816
commit 50cfeb9aa4
8 changed files with 67 additions and 75 deletions

View File

@@ -336,8 +336,8 @@ uint32 Battlenet::Session::VerifyWebCredentials(std::string const& webCredential
}
else
{
if (IpLocationRecord* location = sIPLocation->GetData(ip_address))
_ipCountry = location->country_code;
if (IpLocationRecord const* location = sIPLocation->GetLocationRecord(ip_address))
_ipCountry = location->CountryCode;
TC_LOG_DEBUG("session", "[Session::HandleVerifyWebCredentials] Account '%s' is not locked to ip", _accountInfo->Login.c_str());
if (_accountInfo->LockCountry.empty() || _accountInfo->LockCountry == "00")