mirror of
https://github.com/codex-storage/deluge.git
synced 2025-02-16 05:17:31 +00:00
account for ipv6 brackets [ip:ip:ip]:port
This commit is contained in:
parent
37618e4a13
commit
219be3f440
@ -154,6 +154,12 @@ def add_peer_dialog():
|
||||
response = peer_dialog.run()
|
||||
if response:
|
||||
value = txt_ip.get_text()
|
||||
if ']' in value:
|
||||
#ipv6
|
||||
ip = value.split("]")[0][1:]
|
||||
port = value.split("]")[1][1:]
|
||||
else:
|
||||
#ipv4
|
||||
ip = value.split(":")[0]
|
||||
port = value.split(":")[1]
|
||||
if deluge.common.is_ip(ip):
|
||||
|
Loading…
x
Reference in New Issue
Block a user