fix error on offline players
This commit is contained in:
2
check.py
2
check.py
@@ -13,7 +13,7 @@ def ip_info(player):
|
|||||||
if player.isOnline():
|
if player.isOnline():
|
||||||
return json.load(urllib2.urlopen("http://ipinfo.io%s/json" % str(player.getAddress().getAddress())))
|
return json.load(urllib2.urlopen("http://ipinfo.io%s/json" % str(player.getAddress().getAddress())))
|
||||||
else:
|
else:
|
||||||
return None
|
return {}
|
||||||
|
|
||||||
|
|
||||||
# receive first join date based on the player data (may not be accurate)
|
# receive first join date based on the player data (may not be accurate)
|
||||||
|
|||||||
Reference in New Issue
Block a user