Updated dedicated server launch scripts

OpenRA PR 20783.
This commit is contained in:
penev92 2023-10-01 20:23:57 +03:00 committed by Gustas
parent b696920ba0
commit f6b0ec479b
2 changed files with 7 additions and 4 deletions

View File

@ -3,6 +3,7 @@
@echo on @echo on
set Name="Dedicated Server" set Name="Dedicated Server"
set Map=""
set ListenPort=1234 set ListenPort=1234
set AdvertiseOnline=True set AdvertiseOnline=True
set Password="" set Password=""
@ -18,7 +19,7 @@ set EnableGeoIP=True
set EnableLintChecks=True set EnableLintChecks=True
set ShareAnonymizedIPs=True set ShareAnonymizedIPs=True
set JoinChatDelay=5000 set FloodLimitJoinCooldown=5000
@echo off @echo off
setlocal EnableDelayedExpansion setlocal EnableDelayedExpansion
@ -37,7 +38,7 @@ if not exist %ENGINE_DIRECTORY%\bin\OpenRA.exe goto noengine
cd %ENGINE_DIRECTORY% cd %ENGINE_DIRECTORY%
:loop :loop
bin\OpenRA.Server.exe Game.Mod=%MOD_ID% Engine.EngineDir=".." Server.Name=%Name% Server.ListenPort=%ListenPort% Server.AdvertiseOnline=%AdvertiseOnline% Server.EnableSingleplayer=%EnableSingleplayer% Server.Password=%Password% Server.RequireAuthentication=%RequireAuthentication% Server.RecordReplays=%RecordReplays% Server.ProfileIDBlacklist=%ProfileIDBlacklist% Server.ProfileIDWhitelist=%ProfileIDWhitelist% Server.EnableSyncReports=%EnableSyncReports% Server.EnableGeoIP=%EnableGeoIP% Server.ShareAnonymizedIPs=%ShareAnonymizedIPs% Server.EnableLintChecks=%EnableLintChecks% Engine.SupportDir=%SupportDir% Server.JoinChatDelay=%JoinChatDelay% bin\OpenRA.Server.exe Game.Mod=%MOD_ID% Engine.EngineDir=".." Server.Name=%Name% Server.Map=%Map% Server.ListenPort=%ListenPort% Server.AdvertiseOnline=%AdvertiseOnline% Server.EnableSingleplayer=%EnableSingleplayer% Server.Password=%Password% Server.RequireAuthentication=%RequireAuthentication% Server.RecordReplays=%RecordReplays% Server.ProfileIDBlacklist=%ProfileIDBlacklist% Server.ProfileIDWhitelist=%ProfileIDWhitelist% Server.EnableSyncReports=%EnableSyncReports% Server.EnableGeoIP=%EnableGeoIP% Server.ShareAnonymizedIPs=%ShareAnonymizedIPs% Server.EnableLintChecks=%EnableLintChecks% Engine.SupportDir=%SupportDir% Server.FloodLimitJoinCooldown=%FloodLimitJoinCooldown%
goto loop goto loop
:noengine :noengine

View File

@ -50,6 +50,7 @@ fi
NAME="${Name:-"Dedicated Server"}" NAME="${Name:-"Dedicated Server"}"
LAUNCH_MOD="${Mod:-"${MOD_ID}"}" LAUNCH_MOD="${Mod:-"${MOD_ID}"}"
MAP="${Map:-""}"
LISTEN_PORT="${ListenPort:-"1234"}" LISTEN_PORT="${ListenPort:-"1234"}"
ADVERTISE_ONLINE="${AdvertiseOnline:-"True"}" ADVERTISE_ONLINE="${AdvertiseOnline:-"True"}"
PASSWORD="${Password:-""}" PASSWORD="${Password:-""}"
@ -65,7 +66,7 @@ ENABLE_GEOIP="${EnableGeoIP:-"True"}"
ENABLE_LINT_CHECKS="${EnableLintChecks:-"True"}" ENABLE_LINT_CHECKS="${EnableLintChecks:-"True"}"
SHARE_ANONYMISED_IPS="${ShareAnonymizedIPs:-"True"}" SHARE_ANONYMISED_IPS="${ShareAnonymizedIPs:-"True"}"
JOIN_CHAT_DELAY="${JoinChatDelay:-"5000"}" FLOOD_LIMIT_JOIN_COOLDOWN="${FloodLimitJoinCooldown:-"5000"}"
SUPPORT_DIR="${SupportDir:-""}" SUPPORT_DIR="${SupportDir:-""}"
@ -82,6 +83,7 @@ while true; do
MOD_SEARCH_PATHS="${MOD_SEARCH_PATHS}" \ MOD_SEARCH_PATHS="${MOD_SEARCH_PATHS}" \
${RUNTIME_LAUNCHER} bin/OpenRA.Server.dll Engine.EngineDir=".." Game.Mod="${LAUNCH_MOD}" \ ${RUNTIME_LAUNCHER} bin/OpenRA.Server.dll Engine.EngineDir=".." Game.Mod="${LAUNCH_MOD}" \
Server.Name="${NAME}" \ Server.Name="${NAME}" \
Server.Map="${MAP}" \
Server.ListenPort="${LISTEN_PORT}" \ Server.ListenPort="${LISTEN_PORT}" \
Server.AdvertiseOnline="${ADVERTISE_ONLINE}" \ Server.AdvertiseOnline="${ADVERTISE_ONLINE}" \
Server.Password="${PASSWORD}" \ Server.Password="${PASSWORD}" \
@ -94,6 +96,6 @@ while true; do
Server.EnableGeoIP="${ENABLE_GEOIP}" \ Server.EnableGeoIP="${ENABLE_GEOIP}" \
Server.EnableLintChecks="${ENABLE_LINT_CHECKS}" \ Server.EnableLintChecks="${ENABLE_LINT_CHECKS}" \
Server.ShareAnonymizedIPs="${SHARE_ANONYMISED_IPS}" \ Server.ShareAnonymizedIPs="${SHARE_ANONYMISED_IPS}" \
Server.JoinChatDelay="${JOIN_CHAT_DELAY}" \ Server.FloodLimitJoinCooldown="${FLOOD_LIMIT_JOIN_COOLDOWN}" \
Engine.SupportDir="${SUPPORT_DIR}" Engine.SupportDir="${SUPPORT_DIR}"
done done