CommonClient: Explicitly parse url arg as an archipelago:// url (#3568)
* Launcher "Text Client" --connect archipelago.gg:38281 should work, it doesn't, this fixes that * more explicit handling of expected values * removing launcher updates meaning this pr cannot stand alone but will not have merge issues later * add parser failure when an invalid url is found --------- Co-authored-by: NewSoupVi <57900059+NewSoupVi@users.noreply.github.com>
This commit is contained in:
parent
5021997df0
commit
e4a5ed1cc4
|
@ -1039,11 +1039,14 @@ def run_as_textclient(*args):
|
|||
|
||||
if args.url:
|
||||
url = urllib.parse.urlparse(args.url)
|
||||
args.connect = url.netloc
|
||||
if url.username:
|
||||
args.name = urllib.parse.unquote(url.username)
|
||||
if url.password:
|
||||
args.password = urllib.parse.unquote(url.password)
|
||||
if url.scheme == "archipelago":
|
||||
args.connect = url.netloc
|
||||
if url.username:
|
||||
args.name = urllib.parse.unquote(url.username)
|
||||
if url.password:
|
||||
args.password = urllib.parse.unquote(url.password)
|
||||
else:
|
||||
parser.error(f"bad url, found {args.url}, expected url in form of archipelago://archipelago.gg:38281")
|
||||
|
||||
colorama.init()
|
||||
|
||||
|
|
Loading…
Reference in New Issue