aboutsummaryrefslogtreecommitdiff
path: root/src/server
diff options
context:
space:
mode:
Diffstat (limited to 'src/server')
-rw-r--r--src/server/authserver/Server/AuthSession.cpp4
-rw-r--r--src/server/authserver/authserver.conf.dist9
-rw-r--r--src/server/game/Server/WorldSocket.cpp4
-rw-r--r--src/server/scripts/Commands/cs_account.cpp4
-rw-r--r--src/server/scripts/Commands/cs_misc.cpp4
-rw-r--r--src/server/worldserver/worldserver.conf.dist9
6 files changed, 16 insertions, 18 deletions
diff --git a/src/server/authserver/Server/AuthSession.cpp b/src/server/authserver/Server/AuthSession.cpp
index 648296b620b..703f0f6062f 100644
--- a/src/server/authserver/Server/AuthSession.cpp
+++ b/src/server/authserver/Server/AuthSession.cpp
@@ -341,8 +341,8 @@ void AuthSession::LogonChallengeCallback(PreparedQueryResult result)
}
else
{
- if (IpLocationRecord* location = sIPLocation->GetData(ipAddress))
- _ipCountry = location->country_code;
+ if (IpLocationRecord const* location = sIPLocation->GetLocationRecord(ipAddress))
+ _ipCountry = location->CountryCode;
TC_LOG_DEBUG("server.authserver", "[AuthChallenge] Account '%s' is not locked to ip", _accountInfo.Login.c_str());
if (_accountInfo.LockCountry.empty() || _accountInfo.LockCountry == "00")
diff --git a/src/server/authserver/authserver.conf.dist b/src/server/authserver/authserver.conf.dist
index a6e3d4b8f92..efde048726c 100644
--- a/src/server/authserver/authserver.conf.dist
+++ b/src/server/authserver/authserver.conf.dist
@@ -160,12 +160,11 @@ MySQLExecutable = ""
#
# IPLocationFile
# Description: The path to your IP2Location database CSV file.
-# Example: "C:/Trinity/IP2Location.csv"
-# "/home/trinity/IP2Location.csv"
-# Default: "." - (Current core directory)
-# "" - (Disabled)
+# Example: "C:/Trinity/IP2LOCATION-LITE-DB1.CSV"
+# "/home/trinity/IP2LOCATION-LITE-DB1.CSV"
+# Default: "" - (Disabled)
-IPLocationFile = "."
+IPLocationFile = ""
#
###################################################################################################
diff --git a/src/server/game/Server/WorldSocket.cpp b/src/server/game/Server/WorldSocket.cpp
index 7048879b9d4..a145643e5db 100644
--- a/src/server/game/Server/WorldSocket.cpp
+++ b/src/server/game/Server/WorldSocket.cpp
@@ -520,8 +520,8 @@ void WorldSocket::HandleAuthSessionCallback(std::shared_ptr<AuthSession> authSes
return;
}
- if (IpLocationRecord* location = sIPLocation->GetData(address))
- _ipCountry = location->country_code;
+ if (IpLocationRecord const* location = sIPLocation->GetLocationRecord(address))
+ _ipCountry = location->CountryCode;
///- Re-check ip locking (same check as in auth).
if (account.IsLockedToIP)
diff --git a/src/server/scripts/Commands/cs_account.cpp b/src/server/scripts/Commands/cs_account.cpp
index ac04b1fb2d9..537976dd8e4 100644
--- a/src/server/scripts/Commands/cs_account.cpp
+++ b/src/server/scripts/Commands/cs_account.cpp
@@ -291,10 +291,10 @@ public:
{
if (param == "on")
{
- if (IpLocationRecord* location = sIPLocation->GetData(handler->GetSession()->GetRemoteAddress()))
+ if (IpLocationRecord const* location = sIPLocation->GetLocationRecord(handler->GetSession()->GetRemoteAddress()))
{
PreparedStatement* stmt = LoginDatabase.GetPreparedStatement(LOGIN_UPD_ACCOUNT_LOCK_COUNTRY);
- stmt->setString(0, location->country_code);
+ stmt->setString(0, location->CountryCode);
stmt->setUInt32(1, handler->GetSession()->GetAccountId());
LoginDatabase.Execute(stmt);
handler->PSendSysMessage(LANG_COMMAND_ACCLOCKLOCKED);
diff --git a/src/server/scripts/Commands/cs_misc.cpp b/src/server/scripts/Commands/cs_misc.cpp
index 7a1c9e8738a..d71a0ed3a65 100644
--- a/src/server/scripts/Commands/cs_misc.cpp
+++ b/src/server/scripts/Commands/cs_misc.cpp
@@ -1689,10 +1689,10 @@ public:
lastIp = fields[4].GetString();
lastLogin = fields[5].GetString();
- if (IpLocationRecord* location = sIPLocation->GetData(lastIp))
+ if (IpLocationRecord const* location = sIPLocation->GetLocationRecord(lastIp))
{
lastIp.append(" (");
- lastIp.append(location->country_name);
+ lastIp.append(location->CountryName);
lastIp.append(")");
}
}
diff --git a/src/server/worldserver/worldserver.conf.dist b/src/server/worldserver/worldserver.conf.dist
index 49389b512ac..71382611e8f 100644
--- a/src/server/worldserver/worldserver.conf.dist
+++ b/src/server/worldserver/worldserver.conf.dist
@@ -211,12 +211,11 @@ MySQLExecutable = ""
#
# IPLocationFile
# Description: The path to your IP2Location database CSV file.
-# Example: "C:/Trinity/IP2Location.csv"
-# "/home/trinity/IP2Location.csv"
-# Default: "." - (Current core directory)
-# "" - (Disabled)
+# Example: "C:/Trinity/IP2LOCATION-LITE-DB1.CSV"
+# "/home/trinity/IP2LOCATION-LITE-DB1.CSV"
+# Default: "" - (Disabled)
-IPLocationFile = "."
+IPLocationFile = ""
#
###################################################################################################