rename files

This commit is contained in:
Aokromes committed 2018-06-23 02:21:59 +02:00
1 parent a655d0adc4
commit 0c6fe1941f
23 files changed
+231 -101

No files matched your search

+4 -4
View File
@@ -20,6 +20,7 @@
#include "BattlenetAccountMgr.h"
#include "BigNumber.h"
#include "DatabaseEnv.h"
#include "IPLocation.h"
#include "Opcodes.h"
#include "PacketLog.h"
#include "QueryCallback.h"
@@ -60,7 +61,6 @@ void WorldSocket::Start()
std::string ip_address = GetRemoteIpAddress().to_string();
PreparedStatement* stmt = LoginDatabase.GetPreparedStatement(LOGIN_SEL_IP_INFO);
stmt->setString(0, ip_address);
stmt->setUInt32(1, inet_addr(ip_address.c_str()));
_queryProcessor.AddQuery(LoginDatabase.AsyncQuery(stmt).WithPreparedCallback(std::bind(&WorldSocket::CheckIpCallback, this, std::placeholders::_1)));
}
@@ -76,9 +76,6 @@ void WorldSocket::CheckIpCallback(PreparedQueryResult result)
if (fields[0].GetUInt64() != 0)
banned = true;
if (!fields[1].GetString().empty())
_ipCountry = fields[1].GetString();
} while (result->NextRow());
if (banned)
@@ -614,6 +611,9 @@ void WorldSocket::HandleAuthSessionCallback(std::shared_ptr<AuthSession> authSes
return;
}
if (IpLocationRecord* location = sIPLocation->GetData(address))
_ipCountry = location->country_code;
///- Re-check ip locking (same check as in auth).
if (account.BattleNet.IsLockedToIP) // if ip is locked
{