Explorar o código

Merge branch 'hotfix/v21.4.1'

Daniel Gibbs %!s(int64=4) %!d(string=hai) anos
pai
achega
8f6c349dbd

+ 0 - 29
.github/release-drafter.yml

@@ -1,29 +0,0 @@
-version-template: 'v21.$MINOR.$PATCH'
-name-template: '$RESOLVED_VERSION'
-tag-template: '$RESOLVED_VERSION'
-categories:
-  - title: '🚀 Features'
-    labels:
-      - 'feature'
-      - 'enhancement'
-  - title: '🐛 Bug Fixes'
-    labels:
-      - 'fix'
-      - 'bugfix'
-      - 'bug'
-  - title: '🧰 Maintenance'
-    label: 'chore'
-change-template: '- $TITLE @$AUTHOR (#$NUMBER)'
-change-title-escapes: '\<*_&' # You can add # and @ to disable mentions, and add ` to disable code blocks.
-version-resolver:
-  minor:
-    labels:
-      - 'release'
-  patch:
-    labels:
-      - 'hotfix'
-  default: patch
-template: |
-  ## Changes
-
-  $CHANGES

+ 0 - 29
.github/workflows/release-drafter.yml

@@ -1,29 +0,0 @@
-name: Release Drafter
-
-on:
-  push:
-    # branches to consider in the event; optional, defaults to all
-    branches:
-      - master
-  # pull_request event is required only for autolabeler
-  pull_request:
-    # Only following types are handled by the action, but one can default to all as well
-    types: [opened, reopened, synchronize]
-
-jobs:
-  update_release_draft:
-    runs-on: ubuntu-latest
-    steps:
-      # (Optional) GitHub Enterprise requires GHE_HOST variable set
-      #- name: Set GHE_HOST
-      #  run: |
-      #    echo "GHE_HOST=${GITHUB_SERVER_URL##https:\/\/}" >> $GITHUB_ENV
-
-      # Drafts your next Release notes as Pull Requests are merged into "master"
-      - uses: release-drafter/release-drafter@v5
-        # (Optional) specify config name to use, relative to .github/. Default: release-drafter.yml
-        # with:
-        #   config-name: my-config.yml
-        #   disable-autolabeler: true
-        env:
-          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

+ 14 - 0
.github/workflows/version-check.sh

@@ -0,0 +1,14 @@
+version=$(grep "version=" linuxgsm.sh | sed -e 's/version//g'| tr -d '="')
+modulesversion=$(grep "modulesversion=" lgsm/functions/core_functions.sh | sed -e 's/modulesversion//g'| tr -d '="')
+
+if [ "${version}" != "${modulesversion}" ]; then
+	echo "Error! LinuxGSM version mismatch"
+	echo "Version: ${version}"
+	echo "Modules Version: ${modulesversion}"
+	exit 1
+else
+	echo "Success! LinuxGSM version match"
+	echo "Version: ${version}"
+	echo "Modules Version: ${modulesversion}"
+	exit
+fi

+ 23 - 0
.github/workflows/version-check.yml

@@ -0,0 +1,23 @@
+# This is a basic workflow to help you get started with Actions
+
+name: Version Check
+
+# Controls when the action will run. Triggers the workflow on push or pull request
+# events but only for the master branch
+on: push
+
+# A workflow run is made up of one or more jobs that can run sequentially or in parallel
+jobs:
+  # This workflow contains a single job called "build"
+  Version-Check:
+    # The type of runner that the job will run on
+    runs-on: ubuntu-latest
+
+    # Steps represent a sequence of tasks that will be executed as part of the job
+    steps:
+    # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
+    - uses: actions/checkout@v2
+
+    # Runs a single command using the runners shell
+    - name: compare versions
+      run: chmod +x .github/workflows/version-check.sh; .github/workflows/version-check.sh

+ 1 - 1
lgsm/config-default/config-lgsm/sfserver/_default.cfg

@@ -15,7 +15,7 @@ beaconport="15000"
 port="7777"
 port="7777"
 
 
 ## Server Parameters | https://docs.linuxgsm.com/configuration/start-parameters#additional-parameters
 ## Server Parameters | https://docs.linuxgsm.com/configuration/start-parameters#additional-parameters
-startparameters="FactoryGame -ServerQueryPort=${queryport} -BeaconPort=${beaconport} -GamePort=${port} -log -unattended"
+startparameters="FactoryGame -ServerQueryPort=${queryport} -BeaconPort=${beaconport} -Port=${port} -log -unattended"
 
 
 #### LinuxGSM Settings ####
 #### LinuxGSM Settings ####
 
 

+ 1 - 1
lgsm/functions/core_functions.sh

@@ -8,7 +8,7 @@
 
 
 functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"
 functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"
 
 
-modulesversion="v21.4.0"
+modulesversion="v21.4.1"
 
 
 # Core
 # Core
 
 

+ 23 - 2
lgsm/functions/info_game.sh

@@ -790,6 +790,14 @@ fn_info_game_kf2(){
 	defaultmap=${defaultmap:-"NOT SET"}
 	defaultmap=${defaultmap:-"NOT SET"}
 }
 }
 
 
+fn_info_game_lo(){
+	# Parameters
+	servername=${servername:-"NOT SET"}
+	port=${port:-"0"}
+	queryport=${queryport:-"0"}
+	maxplayers=${slots:-"0"}
+}
+
 fn_info_game_mc(){
 fn_info_game_mc(){
 	# Config
 	# Config
 	if [ ! -f "${servercfgfullpath}" ]; then
 	if [ ! -f "${servercfgfullpath}" ]; then
@@ -803,7 +811,7 @@ fn_info_game_mc(){
 		gamemode="${unavailable}"
 		gamemode="${unavailable}"
 		gameworld="${unavailable}"
 		gameworld="${unavailable}"
 	else
 	else
-		servername=$(grep "motd" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^#/d' -e 's/motd//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//')
+		servername=$(grep "motd" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^#/d' -e 's/motd//g' | tr -d '=\";,:' | sed 's/\\u00A70//g;s/\\u00A71//g;s/\\u00A72//g;s/\\u00A73//g;s/\\u00A74//g;s/\\u00A75//g;s/\\u00A76//g;s/\\u00A77//g;s/\\u00A78//g;s/\\u00A79//g;s/\\u00A7a//g;s/\\u00A7b//g;s/\\u00A7c//g;s/\\u00A7d//g;s/\\u00A7e//g;s/\\u00A7f//g;s/\\u00A7l//g;s/\\u00A7o//g;s/\\u00A7n//g;s/\\u00A7m//g;s/\\u00A7k//g' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//')
 		rconpassword=$(grep "rcon.password" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^#/d' -e 's/rcon.password//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//')
 		rconpassword=$(grep "rcon.password" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^#/d' -e 's/rcon.password//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//')
 		rconport=$(grep "rcon.port" "${servercfgfullpath}" | grep -v "#" | tr -cd '[:digit:]')
 		rconport=$(grep "rcon.port" "${servercfgfullpath}" | grep -v "#" | tr -cd '[:digit:]')
 		maxplayers=$(grep "max-players" "${servercfgfullpath}" | grep -v "#" | tr -cd '[:digit:]')
 		maxplayers=$(grep "max-players" "${servercfgfullpath}" | grep -v "#" | tr -cd '[:digit:]')
@@ -1550,6 +1558,14 @@ fn_info_game_sdtd(){
 	fi
 	fi
 }
 }
 
 
+fn_info_game_sf(){
+	# Parameters
+	servername=${selfname:-"NOT SET"}
+	port=${port:-"0"}
+	queryport=${queryport:-"0"}
+	beaconport=${beaconport:-"0"}
+}
+
 fn_info_game_sof2(){
 fn_info_game_sof2(){
 	# Config
 	# Config
 	if [ ! -f "${servercfgfullpath}" ]; then
 	if [ ! -f "${servercfgfullpath}" ]; then
@@ -1927,7 +1943,8 @@ fn_info_game_unt(){
 	# Parameters
 	# Parameters
 	servername=${selfname:-"NOT SET"}
 	servername=${selfname:-"NOT SET"}
 	port=${port:-"0"}
 	port=${port:-"0"}
-	queryport=$((port+1))
+	queryport=${port}
+	steamport=$((port+1))
 }
 }
 
 
 fn_info_game_ut(){
 fn_info_game_ut(){
@@ -2230,6 +2247,8 @@ elif [ "${shortname}" == "kf" ]; then
 	fn_info_game_kf
 	fn_info_game_kf
 elif [ "${shortname}" == "kf2" ]; then
 elif [ "${shortname}" == "kf2" ]; then
 	fn_info_game_kf2
 	fn_info_game_kf2
+elif [ "${shortname}" == "lo" ]; then
+	fn_info_game_lo
 elif [ "${shortname}" == "mc" ]||[ "${shortname}" == "pmc" ]; then
 elif [ "${shortname}" == "mc" ]||[ "${shortname}" == "pmc" ]; then
 	fn_info_game_mc
 	fn_info_game_mc
 elif [ "${shortname}" == "mcb" ]; then
 elif [ "${shortname}" == "mcb" ]; then
@@ -2280,6 +2299,8 @@ elif [ "${shortname}" == "scpsl" ]||[ "${shortname}" == "scpslsm" ]; then
 	fn_info_game_scpsl
 	fn_info_game_scpsl
 elif [ "${shortname}" == "sdtd" ]; then
 elif [ "${shortname}" == "sdtd" ]; then
 	fn_info_game_sdtd
 	fn_info_game_sdtd
+elif [ "${shortname}" == "sf" ]; then
+	fn_info_game_sf
 elif [ "${shortname}" == "sof2" ]; then
 elif [ "${shortname}" == "sof2" ]; then
 	fn_info_game_sof2
 	fn_info_game_sof2
 elif [ "${shortname}" == "sol" ]; then
 elif [ "${shortname}" == "sol" ]; then

+ 2 - 1
lgsm/functions/info_messages.sh

@@ -800,7 +800,7 @@ fn_info_message_arma3(){
 		fn_port "header"
 		fn_port "header"
 		fn_port "Game" port udp
 		fn_port "Game" port udp
 		fn_port "Voice" voiceport udp
 		fn_port "Voice" voiceport udp
-		fn_port "Query Steam" queryport udp
+		fn_port "Query" queryport udp
 		fn_port "Steam Master" steammasterport udp
 		fn_port "Steam Master" steammasterport udp
 		fn_port "Voice (unused)" voiceunusedport udp
 		fn_port "Voice (unused)" voiceunusedport udp
 		fn_port "BattleEye" battleeyeport udp
 		fn_port "BattleEye" battleeyeport udp
@@ -1517,6 +1517,7 @@ fn_info_message_unt(){
 		fn_port "header"
 		fn_port "header"
 		fn_port "Game" port udp
 		fn_port "Game" port udp
 		fn_port "Query" queryport udp
 		fn_port "Query" queryport udp
+		fn_port "Steam" steamport udp
 	} | column -s $'\t' -t
 	} | column -s $'\t' -t
 }
 }
 
 

+ 2 - 1
lgsm/functions/query_gsquery.py

@@ -59,10 +59,12 @@ class gsquery:
         self.response = None
         self.response = None
         self.sanity_checks()
         self.sanity_checks()
 
 
+    @staticmethod
     def fatal_error(self, error_message, error_code=1):
     def fatal_error(self, error_message, error_code=1):
         sys.stderr.write('ERROR: ' + str(error_message) + '\n')
         sys.stderr.write('ERROR: ' + str(error_message) + '\n')
         sys.exit(error_code)
         sys.exit(error_code)
 
 
+    @staticmethod
     def exit_success(self, success_message=''):
     def exit_success(self, success_message=''):
         sys.stdout.write('OK: ' + str(success_message) + '\n')
         sys.stdout.write('OK: ' + str(success_message) + '\n')
         sys.exit(0)
         sys.exit(0)
@@ -140,6 +142,5 @@ if __name__ == '__main__':
         help='Display debugging output.'
         help='Display debugging output.'
     )
     )
     options, arguments = parser.parse_args()
     options, arguments = parser.parse_args()
-    #
     server = gsquery(options, arguments)
     server = gsquery(options, arguments)
     server.responding()
     server.responding()

+ 1 - 1
linuxgsm.sh

@@ -20,7 +20,7 @@ if [ -f ".dev-debug" ]; then
 	set -x
 	set -x
 fi
 fi
 
 
-version="v21.4.0"
+version="v21.4.1"
 shortname="core"
 shortname="core"
 gameservername="core"
 gameservername="core"
 commandname="CORE"
 commandname="CORE"

+ 1 - 1
tests/tests_fctrserver.sh

@@ -20,7 +20,7 @@ if [ -f ".dev-debug" ]; then
 	set -x
 	set -x
 fi
 fi
 
 
-version="v21.4.0"
+version="v21.4.1"
 shortname="fctr"
 shortname="fctr"
 gameservername="fctrserver"
 gameservername="fctrserver"
 commandname="CORE"
 commandname="CORE"

+ 1 - 1
tests/tests_jc2server.sh

@@ -20,7 +20,7 @@ if [ -f ".dev-debug" ]; then
 	set -x
 	set -x
 fi
 fi
 
 
-version="v21.4.0"
+version="v21.4.1"
 shortname="jc2"
 shortname="jc2"
 gameservername="jc2server"
 gameservername="jc2server"
 commandname="CORE"
 commandname="CORE"

+ 1 - 1
tests/tests_mcserver.sh

@@ -20,7 +20,7 @@ if [ -f ".dev-debug" ]; then
 	set -x
 	set -x
 fi
 fi
 
 
-version="v21.4.0"
+version="v21.4.1"
 shortname="mc"
 shortname="mc"
 gameservername="mcserver"
 gameservername="mcserver"
 commandname="CORE"
 commandname="CORE"

+ 1 - 1
tests/tests_ts3server.sh

@@ -20,7 +20,7 @@ if [ -f ".dev-debug" ]; then
 	set -x
 	set -x
 fi
 fi
 
 
-version="v21.4.0"
+version="v21.4.1"
 shortname="ts3"
 shortname="ts3"
 gameservername="ts3server"
 gameservername="ts3server"
 commandname="CORE"
 commandname="CORE"