mirror of
https://git.deluge-torrent.org/deluge
synced 2025-08-18 16:18:45 +00:00
account for ipv6 brackets [ip:ip:ip]:port
This commit is contained in:
parent
37618e4a13
commit
219be3f440
1 changed files with 8 additions and 2 deletions
|
@ -154,6 +154,12 @@ def add_peer_dialog():
|
||||||
response = peer_dialog.run()
|
response = peer_dialog.run()
|
||||||
if response:
|
if response:
|
||||||
value = txt_ip.get_text()
|
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]
|
ip = value.split(":")[0]
|
||||||
port = value.split(":")[1]
|
port = value.split(":")[1]
|
||||||
if deluge.common.is_ip(ip):
|
if deluge.common.is_ip(ip):
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue