Fixed command formatting having too many spaces.

This commit is contained in:
2026-05-03 01:12:35 +02:00
parent 36be931e9f
commit ca7283d57a

View File

@@ -139,14 +139,14 @@ def server_command_builder(
return "ERROR_NEWAIS"
command = [
SERVER_PATH,
"-TS ",
" -TS",
name,
"--port ",
" --port ",
str(port),
"--statuspage ",
" --statuspage ",
os.getcwd() + "/games/" + name + "/turnstats.html",
"--era ",
era,
" --era ",
str(era),
]
if team_game:
for team in teams:
@@ -158,10 +158,10 @@ def server_command_builder(
" --team " + str(team[0]) + " " + str(team[1]) + " " + str(team[2])
)
if clustered_start:
command.append(" --clustered ")
command.append(" --clustered")
if not client_start:
command.append(" --noclientstart ")
command.append(" --noclientstart")
if cataclysm > 0:
command.append(" --cataclysm " + str(cataclysm))
if conq_all:
@@ -169,7 +169,7 @@ def server_command_builder(
if not research_difficulty == 2:
command.append(" --research " + str(research_difficulty))
if not random_start_research:
command.append(" --norandres ")
command.append(" --norandres")
if not hof_size == 10:
command.append(" --hof_size " + str(hof_size))
if not global_slots == 5:
@@ -193,24 +193,24 @@ def server_command_builder(
if not start_prov == 1:
command.append(" --startprov " + str(start_prov))
if renaming:
command.append(" --renaming ")
command.append(" --renaming")
if score_graphs:
command.append(" --scoregraphs ")
command.append(" --scoregraphs")
if no_nation_info:
command.append(" --nonationinfo ")
command.append(" --nonationinfo")
if no_cheat_det:
command.append(" --nocheatdet ")
command.append(" --nocheatdet")
if no_artifact_rest:
command.append(" --noartrest ")
command.append(" --noartrest")
if story_events == 1:
command.append(" --storyevents ")
command.append(" --storyevents")
elif story_events == 2:
command.append(" --allstoryevents ")
command.append(" --allstoryevents")
command.append(" --newailvl " + str(new_ai_lvl))
if no_new_ai:
command.append(" --nonewai ")
command.append(" --nonewai")
if conq_all:
command.append(" --conqall ")
command.append(" --conqall")
command.append(
" --thrones " + str(thrones[0]) + " " + str(thrones[1]) + " " + str(thrones[2])
)
@@ -218,10 +218,10 @@ def server_command_builder(
if not cataclysm == 0:
command.append(" --cataclysm " + str(cataclysm))
if vwrap:
command.append(" --vwrap ")
command.append(" --vwrap")
if not hwrap:
command.append(" --nohwrap ")
return command
command.append(" --nohwrap")
return "".join(command)
def is_port_in_use(port: int) -> bool: