Print host instead of ip address if host is specified. Also embed specified host into bmbp files. (#57)

This commit is contained in:
CaitSith2 2020-04-02 10:40:38 -07:00 committed by GitHub
parent 412e30fabc
commit 959917bb13
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 2 deletions

View File

@ -51,6 +51,7 @@ if __name__ == "__main__":
meta_file_path = multi_mystery_options["meta_file_path"]
teams = multi_mystery_options["teams"]
rom_file = options["general_options"]["rom_file"]
host = options["server_options"]["host"]
port = options["server_options"]["port"]
@ -143,7 +144,7 @@ if __name__ == "__main__":
zipname = os.path.join(output_path, f"ER_{seedname}.{typical_zip_ending}")
print(f"Creating zipfile {zipname}")
ipv4 = get_public_ipv4() + ":" + str(port)
ipv4 = (host if host else get_public_ipv4()) + ":" + str(port)
with zipfile.ZipFile(zipname, "w", compression=compression, compresslevel=9) as zf:
for file in os.listdir(output_path):
if file.endswith(".sfc") and seedname in file:

View File

@ -670,7 +670,7 @@ async def main(args: argparse.Namespace):
logging.error('Failed to read multiworld data (%s)' % e)
return
ip = Utils.get_public_ipv4()
ip = args.host if args.host else Utils.get_public_ipv4()