From 64e8efbc0792da9ff322c7095aa7a4b0f8bc6a68 Mon Sep 17 00:00:00 2001 From: shortcutme Date: Sun, 20 Jan 2019 03:28:49 +0100 Subject: [PATCH] Fix ipv6 address placing to sidebar map --- plugins/Sidebar/SidebarPlugin.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/Sidebar/SidebarPlugin.py b/plugins/Sidebar/SidebarPlugin.py index e4e77067..da14e920 100644 --- a/plugins/Sidebar/SidebarPlugin.py +++ b/plugins/Sidebar/SidebarPlugin.py @@ -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)