From f0c984ad47ad81c5d47506b5f1217e0033dd865a Mon Sep 17 00:00:00 2001 From: Nyo Date: Thu, 12 May 2016 19:22:13 +0200 Subject: [PATCH] .BANCHO. .FIX. Temporary fix for bancho country and location --- loginEvent.py | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/loginEvent.py b/loginEvent.py index 33110df..74b14f5 100644 --- a/loginEvent.py +++ b/loginEvent.py @@ -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")