bugfix exec_path added

main
Alex 5 months ago
parent 25b3ff4169
commit 67ee051f63

@ -70,10 +70,11 @@ gaming_server_profiles = {
"dst_vanilla": {
'profile_id': 'dst_sanders',
'exec_type': 'exe_dst',
'exec_path': "C:/Program Files (x86)/Steam/steamapps/common/Don't Starve Together Dedicated Server/bin/",
'server_name': 'Dont Starve at Sanders',
'directory': "C:/Users/4lexK/Desktop/GameServers/Dont Starve/Dont Starve at Sanders (Vanilla)",
'command_DontStarveAtSandersOverworld': ["C:/Program Files (x86)/Steam/steamapps/common/Don't Starve Together Dedicated Server/bin/dontstarve_dedicated_server_nullrenderer.exe", '-persistent_storage_root', "C:/Users/4lexK/Desktop/GameServers/Dont Starve/Dont Starve at Sanders (Vanilla)", '-conf_dir', 'DontStarveAtSandersOverworld', '-console'],
'command_DontStarveAtSandersCaves': ["C:/Program Files (x86)/Steam/steamapps/common/Don't Starve Together Dedicated Server/bin/dontstarve_dedicated_server_nullrenderer.exe", '-persistent_storage_root', "C:/Users/4lexK/Desktop/GameServers/Dont Starve/Dont Starve at Sanders (Vanilla)", '-conf_dir', 'DontStarveAtSandersCave', '-console'],
'command_DontStarveAtSandersOverworld': ["dontstarve_dedicated_server_nullrenderer.exe", '-persistent_storage_root', "C:/Users/4lexK/Desktop/GameServers/Dont Starve/Dont Starve at Sanders (Vanilla)", '-conf_dir', 'DontStarveAtSandersOverworld', '-console'],
'command_DontStarveAtSandersCaves': ["dontstarve_dedicated_server_nullrenderer.exe", '-persistent_storage_root', "C:/Users/4lexK/Desktop/GameServers/Dont Starve/Dont Starve at Sanders (Vanilla)", '-conf_dir', 'DontStarveAtSandersCave', '-console'],
'wait_time': 30
}
# Ragnarok Online
@ -359,7 +360,7 @@ def start_gameserver(profile: str) -> str:
with open(log_file, 'w') as log:
process = subprocess.Popen(
server[f'command_{shard}'],
cwd=server['directory'],
cwd=server['exec_path'],
stdout=log,
stderr=log,
creationflags=subprocess.CREATE_NEW_PROCESS_GROUP if os.name == 'nt' else 0
@ -611,13 +612,16 @@ async def handle_callback(update: Update, context: ContextTypes.DEFAULT_TYPE) ->
case "gameservers_dst":
await query.message.reply_text("Wähle einen Don't Starve Together Server:", reply_markup=InlineKeyboardMarkup(dont_starve_menu))
case "dst_vanilla":
await query.message.reply_text("Wähle einen Aktion für den Minecraft Vanilla Server:", reply_markup=InlineKeyboardMarkup(mc_sandervalley_menu))
case "dst_stop":
await query.message.reply_text("Wähle einen Aktion für den Dont Starve at Sanders Server:", reply_markup=InlineKeyboardMarkup(dst_vanilla_menu))
case "dst_vanilla_start":
msg = start_gameserver("dst_vanilla")
await query.message.reply_text(f"{msg}")
case "dst_vanilla_stop":
msg = "Not Implemented yet"
await query.message.reply_text(f"{msg}")
await send_main_menu(context, query.message.chat_id)
case "dst_back":
await query.message.reply_text("Wähle einen Gameserver Typ:", reply_markup=InlineKeyboardMarkup(gameserver_menu))
case "dst_vanilla_back":
await query.message.reply_text("Wähle einen Don't Starve Together Server:", reply_markup=InlineKeyboardMarkup(dont_starve_menu))
# Ragnarok Online Server
case "ro_start":
msg = "Not Implemented yet"

Loading…
Cancel
Save