aboutsummaryrefslogtreecommitdiff
path: root/src/server/authserver
diff options
context:
space:
mode:
authorShauren <shauren.trinity@gmail.com>2018-06-23 21:31:09 +0200
committerShauren <shauren.trinity@gmail.com>2018-06-23 21:31:09 +0200
commit0ead73516adfeaff96292685592085e20737d535 (patch)
tree816971749135215f2ec19a9039ef80a38999b9d4 /src/server/authserver
parent1c7f9a2ad84324e13e60e786fb063848285d2f72 (diff)
Core/Misc: Improved ip2location code and set it to disabled by default
Diffstat (limited to 'src/server/authserver')
-rw-r--r--src/server/authserver/Server/AuthSession.cpp4
-rw-r--r--src/server/authserver/authserver.conf.dist9
2 files changed, 6 insertions, 7 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 = ""
#
###################################################################################################