Fallback country ISO code if GeoIP fails
This commit is contained in:
@@ -640,6 +640,10 @@ function processPlayerEnteringExitingProperty(client) {
|
|||||||
// ===========================================================================
|
// ===========================================================================
|
||||||
|
|
||||||
function getPlayerCountryISOCode(client) {
|
function getPlayerCountryISOCode(client) {
|
||||||
|
if (getPlayerIP(client) == "127.0.0.1" || getPlayerIP(client).indexOf("192.168.") != -1) {
|
||||||
|
return "US";
|
||||||
|
}
|
||||||
|
|
||||||
return module.geoip.getCountryISO(getGlobalConfig().geoIPCountryDatabaseFilePath, getPlayerIP(client));
|
return module.geoip.getCountryISO(getGlobalConfig().geoIPCountryDatabaseFilePath, getPlayerIP(client));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user