.BANCHO. .FIX. Temporary fix for bancho country and location

This commit is contained in:
Nyo 2016-05-12 19:22:13 +02:00
parent 97d81696b1
commit f0c984ad47

View File

@ -125,15 +125,16 @@ def handle(flaskRequest):
# Get location and country from ip.zxq.co or database
if generalFunctions.stringToBool(glob.conf.config["server"]["localizeusers"]):
# Make sure this user has not disabled his country flag
if userHelper.getShowCountry(userID) == False:
location = [0,0]
countryLetters = "XX"
country = 0
else:
# Get location and country from IP
location = locationHelper.getLocation(requestIP)
countryLetters = locationHelper.getCountry(requestIP)
country = countryHelper.getCountryID(countryLetters)
#if userHelper.getShowCountry(userID) == False:
# location = [0,0]
# countryLetters = "XX"
# country = 0
#else:
# Get location and country from IP
location = locationHelper.getLocation(requestIP)
countryLetters = locationHelper.getCountry(requestIP)
country = countryHelper.getCountryID(countryLetters)
else:
# Set location to 0,0 and get country from db
print("[!] Location skipped")