Fix ipv6 address placing to sidebar map

This commit is contained in:
shortcutme 2019-01-20 03:28:49 +01:00
parent 15f4bc5bd6
commit 64e8efbc07
No known key found for this signature in database
GPG key ID: 5B63BAE6CB9613AE

View file

@ -653,7 +653,7 @@ class UiWebsocketPlugin(object):
# Create position array
lat, lon = loc["lat"], loc["lon"]
latlon = "%s,%s" % (lat, lon)
if latlon in placed: # Dont place more than 1 bar to same place, fake repos using ip address last two part
if latlon in placed and helper.getIpType(peer.ip) == "ipv4": # Dont place more than 1 bar to same place, fake repos using ip address last two part
lat += float(128 - int(peer.ip.split(".")[-2])) / 50
lon += float(128 - int(peer.ip.split(".")[-1])) / 50
latlon = "%s,%s" % (lat, lon)