Don't add .onion if it is not needed

This commit is contained in:
Kevin F 2022-06-05 14:46:01 -05:00
parent 9088d931c9
commit 946fdbd06d
1 changed files with 4 additions and 1 deletions

View File

@ -20,6 +20,9 @@ def on_announce_rec(api, data=None):
return
announced = announced.strip()
announced += '.onion'
if not announced.endswith('.onion'):
announced += '.onion'
logger.info(f"Peer {announced} announced to us.", terminal=True)
data['callback'](TorPeer(socks_address, socks_port, announced))