Răsfoiți Sursa

Merge pull request #569 from PhilPhonic/patch-1

enhanced mod-support
Daniel Gibbs 10 ani în urmă
părinte
comite
b90a19dd31
3 a modificat fișierele cu 48 adăugiri și 29 ștergeri
  1. 9 1
      Arma3/arma3server
  2. 16 5
      Arma3/cfg/lgsm-default.server.cfg
  3. 23 23
      functions/fn_details_config

+ 9 - 1
Arma3/arma3server

@@ -25,10 +25,11 @@ steampass="password"
 
 
 # Start Variables
 # Start Variables
 ip="0.0.0.0"
 ip="0.0.0.0"
+srvport="2302"
 updateonstart="off"
 updateonstart="off"
 
 
 fn_parms(){
 fn_parms(){
-parms="-netlog -ip=${ip} -cfg=${networkcfgfullpath} -config=${servercfgfullpath} -mod=${mods}"
+parms="-netlog -ip=${ip} -port=${srvport} -cfg=${networkcfgfullpath} -config=${servercfgfullpath} -mod=${mods} -servermod=${servermods} -bepath=${bepath} -autoinit -loadmissiontomemory"
 }
 }
 
 
 # ARMA 3 Modules
 # ARMA 3 Modules
@@ -39,6 +40,13 @@ parms="-netlog -ip=${ip} -cfg=${networkcfgfullpath} -config=${servercfgfullpath}
 # and chmod modules directories to 775
 # and chmod modules directories to 775
 mods=""
 mods=""
 
 
+# Server-side Mods
+servermods=""
+
+# Path to BattlEye
+# leave empty for default
+bepath=""
+
 #### Advanced Variables ####
 #### Advanced Variables ####
 
 
 # Github Branch Select
 # Github Branch Select

+ 16 - 5
Arma3/cfg/lgsm-default.server.cfg

@@ -5,18 +5,20 @@
 
 
 
 
 // PORTS
 // PORTS
-
+// please specify the serverport as a parameter in arma3server executable
+// it will automatically use the serverport including the next 3 for steam query & steam master.
+// the fourth port ist not documented in https://community.bistudio.com/wiki/Arma_3_Dedicated_Server#Port_Forwarding
 // Server Port
 // Server Port
 //  default: 2302.
 //  default: 2302.
-serverport=2302;
+// serverport=2302;
 
 
 // Steam Master Port
 // Steam Master Port
 //  default: 2304.
 //  default: 2304.
-steamport=2304;
+// steamport=2304;
 
 
 // Steam Query Port
 // Steam Query Port
 //  default: 2303.
 //  default: 2303.
-steamqueryport=2303;
+//steamqueryport=2303;
 
 
 
 
 // GENERAL SETTINGS
 // GENERAL SETTINGS
@@ -119,4 +121,13 @@ doubleIdDetected = "";					//
 // ban = ban (_this select 0)
 // ban = ban (_this select 0)
 onUnsignedData = "kick (_this select 0)";
 onUnsignedData = "kick (_this select 0)";
 onHackedData = 	"kick (_this select 0)";
 onHackedData = 	"kick (_this select 0)";
-onDifferentData = "";
+onDifferentData = "";
+
+// HEADLESS CLIENT SUPPORT
+// specify ip-adresses of allowed headless clients
+// if more than one:
+// headlessClients[]={"127.0.0.1", "192.168.0.1"};
+// localClient[]={"127.0.0.1", "192.168.0.1"};
+headlessClients[]={"127.0.0.1"};
+localClient[]={"127.0.0.1"};
+battleyeLicense=1;

+ 23 - 23
functions/fn_details_config

@@ -209,29 +209,29 @@ elif [ "${engine}" == "realvirtuality" ]; then
 		slots="\e[0;31mUNAVAILABLE\e[0m"
 		slots="\e[0;31mUNAVAILABLE\e[0m"
 	fi
 	fi
 
 
-	# port
-	if [ -f "${servercfgfullpath}" ]; then
-		port=$(grep "serverport=" "${servercfgfullpath}" | grep -v // | tr -d '\r' | tr -cd '[:digit:]')
-	fi
-	if [ ! -n "${port}" ]; then
-		port="0"
-	fi
-
-	# query port
-	if [ -f "${servercfgfullpath}" ]; then
-		queryport=$(grep "steamqueryport=" "${servercfgfullpath}" | grep -v // | tr -d '\r' | tr -cd '[:digit:]')
-	fi
-	if [ ! -n "${queryport}" ]; then
-		queryport="0"
-	fi
-
-	# master port
-	if [ -f "${servercfgfullpath}" ]; then
-		masterport=$(grep "steamport=" "${servercfgfullpath}" | grep -v // | tr -d '\r' | tr -cd '[:digit:]')
-	fi
-	if [ ! -n "${masterport}" ]; then
-		masterport="0"
-	fi
+        # port
+        if [ "${srvport}" != "" ]; then
+                        port=${srvport}
+        fi
+        if [ ! -n "${port}" ]; then
+                port="0"
+        fi
+
+        # query port
+        if [ "${srvport}" != "" ]; then
+                queryport=$((srvport+1))
+        fi
+        if [ ! -n "${queryport}" ]; then
+                queryport="0"
+        fi
+
+        # master port
+        if [ "${srvport}" != "" ]; then
+                masterport=$((srvport+2))
+        fi
+        if [ ! -n "${masterport}" ]; then
+                masterport="0"
+        fi
 
 
 	fn_servercfgfullpath
 	fn_servercfgfullpath