Fallback country ISO code if GeoIP fails

This commit is contained in:
Vortrex
2022-11-02 06:51:47 -05:00
parent 757df5db86
commit b1f9042b96

View File

@@ -640,6 +640,10 @@ function processPlayerEnteringExitingProperty(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));
}