Kaynağa Gözat

Merge branch 'feature/bt44server' into develop

Daniel Gibbs 8 yıl önce
ebeveyn
işleme
d11116bc98

+ 120 - 0
lgsm/config-default/config-lgsm/bt1944server/_default.cfg

@@ -0,0 +1,120 @@
+##################################
+######## Default Settings ########
+##################################
+# DO NOT EDIT WILL BE OVERWRITTEN!
+# Copy settings from here and use them in either
+# common.cfg - applies settings to every instance
+# [instance].cfg - applies settings to a specific instance
+
+#### Server Settings ####
+
+## Server Start Settings | https://github.com/GameServerManagers/LinuxGSM/wiki/Start-Parameters
+ip="0.0.0.0"
+port="7777"
+queryport="7780"
+
+## Server Start Command | https://github.com/GameServerManagers/LinuxGSM/wiki/Start-Parameters#additional-parameters
+fn_parms(){
+parms="/Game/Maps/Final_Maps/Derailed?Game=/Script/ShooterGame.BombGameMode?listen -log -broadcastip=\"${ip}\" -PORT=${port} -QueryPort=${queryport} -defgameini=\"${servercfgfullpath}\""
+}
+
+#### LinuxGSM Settings ####
+
+## Notification Alerts
+# (on|off)
+
+# More info | https://github.com/GameServerManagers/LinuxGSM/wiki/Alerts#more-info
+postalert="off"
+postdays="7"
+posttarget="https://hastebin.com"
+
+# Discord Alerts | https://github.com/GameServerManagers/LinuxGSM/wiki/Discord
+discordalert="off"
+discordwebhook="webhook"
+
+# Email Alerts | https://github.com/GameServerManagers/LinuxGSM/wiki/Email
+emailalert="off"
+email="email@example.com"
+emailfrom=""
+
+# IFTTT Alerts | https://github.com/GameServerManagers/LinuxGSM/wiki/IFTTT
+iftttalert="off"
+ifttttoken="accesstoken"
+iftttevent="linuxgsm_alert"
+
+# Mailgun Email Alerts | https://github.com/GameServerManagers/LinuxGSM/wiki/mailgun
+mailgunalert="off"
+mailguntoken="accesstoken"
+mailgundomain="example.com"
+mailgunemailfrom="alert@example.com"
+mailgunemail="email@myemail.com"
+
+# Pushbullet Alerts | https://github.com/GameServerManagers/LinuxGSM/wiki/Pushbullet
+pushbulletalert="off"
+pushbullettoken="accesstoken"
+channeltag=""
+
+# Pushover Alerts | https://github.com/GameServerManagers/LinuxGSM/wiki/Pushover
+pushoveralert="off"
+pushovertoken="accesstoken"
+
+# Telegram Alerts | https://github.com/GameServerManagers/LinuxGSM/wiki/Telegram
+telegramalert="off"
+telegramtoken="accesstoken"
+telegramchatid=""
+
+## Updating | https://github.com/GameServerManagers/LinuxGSM/wiki/Update
+updateonstart="off"
+
+## Backup | https://github.com/GameServerManagers/LinuxGSM/wiki/Backup
+maxbackups="4"
+maxbackupdays="30"
+stoponbackup="on"
+
+## Logging | https://github.com/GameServerManagers/LinuxGSM/wiki/Logging
+consolelogging="on"
+logdays="7"
+
+#### LinuxGSM Advanced Settings ####
+
+## SteamCMD Settings
+# Server appid
+appid="805140"
+# Steam App Branch Select
+# Allows to opt into the various Steam app branches. Default branch is "".
+# Example: "-beta latest_experimental"
+branch=""
+
+## LinuxGSM Server Details
+# Do not edit
+gamename="Battalion 1944"
+engine="unreal4"
+
+#### Directories ####
+# Edit with care
+
+## Server Specific Directories
+systemdir="${serverfiles}/Linux/Battalion"
+executabledir="${systemdir}/Binaries/Linux"
+executable="./BattalionServer"
+servercfgdir="${systemdir}/Saved/Config/LinuxServer"
+servercfg="${servicename}.ini"
+servercfgdefault="DefaultGame.ini"
+servercfgfullpath="${servercfgdir}/${servercfg}"
+
+## Backup Directory
+backupdir="${lgsmdir}/backup"
+
+## Logging Directories
+logdir="${rootdir}/log"
+gamelogdir="${systemdir}/Saved/Logs"
+lgsmlogdir="${logdir}/script"
+consolelogdir="${logdir}/console"
+lgsmlog="${lgsmlogdir}/${servicename}-script.log"
+consolelog="${consolelogdir}/${servicename}-console.log"
+alertlog="${lgsmlogdir}/${servicename}-alert.log"
+postdetailslog="${lgsmlogdir}/${servicename}-postdetails.log"
+
+## Logs Naming
+lgsmlogdate="${lgsmlogdir}/${servicename}-script-$(date '+%Y-%m-%d-%H:%M:%S').log"
+consolelogdate="${consolelogdir}/${servicename}-console-$(date '+%Y-%m-%d-%H:%M:%S').log"

+ 1 - 0
lgsm/data/serverlist.csv

@@ -7,6 +7,7 @@ bd,bdserver,Base Defense
 bmdm,bmdmserver,Black Mesa: Deathmatch
 bs,bsserver,Blade Symphony
 bb2,bb2server,BrainBread 2
+bt1944,bt1944server,Battalion 1944
 cod,codserver,Call of Duty
 cod2,cod2server,Call of Duty 2
 cod4,cod4server,Call of Duty 4

+ 1 - 1
lgsm/functions/command_monitor.sh

@@ -79,7 +79,7 @@ fn_monitor_tmux(){
 		fn_print_ok_eol_nl
 		fn_script_log_pass "Checking session: OK"
 		# runs gsquery check on game with specific engines.
-		local allowed_engines_array=( avalanche2.0 avalanche3.0 goldsource idtech2 idtech3 idtech3_ql iw2.0 iw3.0 madness quake refractor realvirtuality source spark starbound unity3d unreal unreal2 )
+		local allowed_engines_array=( avalanche2.0 avalanche3.0 goldsource idtech2 idtech3 idtech3_ql iw2.0 iw3.0 madness quake refractor realvirtuality source spark starbound unity3d unreal unreal2 unreal4 )
 		for allowed_engine in "${allowed_engines_array[@]}"
 		do
 			if [ "${allowed_engine}" == "starbound" ]; then

+ 1 - 1
lgsm/functions/gsquery.py

@@ -17,7 +17,7 @@ class PythonGSQ:
         self.server_response_timeout = 5
         self.default_buffer_length = 1024
         #
-        sourcequery=[ 'avalanche3.0','madness','quakelive','realvirtuality','refractor','source','goldsource','spark','starbound','unity3d']
+        sourcequery=[ 'avalanche3.0','madness','quakelive','realvirtuality','refractor','source','goldsource','spark','starbound','unity3d', 'unreal4' ]
         idtech3query=['idtech3','quake','iw3.0']
         idtech2query=['idtech2','iw2.0']
         if self.option.engine in sourcequery:

+ 17 - 0
lgsm/functions/info_config.sh

@@ -108,6 +108,20 @@ fn_info_config_ballistic_overkill(){
 	fi
 }
 
+fn_info_config_battalion1944(){
+	if [ ! -f "${servercfgfullpath}" ]; then
+		servername="${unavailable}"
+		serverpassword="${unavailable}"
+	else
+		servername=$(grep "ServerName" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^--/d' -e 's/ServerName//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//')
+		serverpassword=$(grep "Password" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^--/d' -e 's/Password//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//')
+
+		# Not Set
+		servername=${servername:-"NOT SET"}
+		serverpassword=${serverpassword:-"NOT SET"}
+	fi
+}
+
 fn_info_config_bf1942(){
 	if [ ! -f "${servercfgfullpath}" ]; then
 		servername="${unavailable}"
@@ -916,6 +930,9 @@ if [ "${gamename}" == "ARK: Survivial Evolved" ]; then
 # Ballistic Overkill
 elif [ "${gamename}" == "Ballistic Overkill" ]; then
 	fn_info_config_ballistic_overkill
+# Battalion 1944
+elif [ "${gamename}" == "Battalion 1944" ]; then
+	fn_info_config_battalion1944
 # Battlefield: 1942
 elif [ "${gamename}" == "Battlefield: 1942" ]; then
 	fn_info_config_bf1942

+ 3 - 0
lgsm/functions/info_glibc.sh

@@ -12,6 +12,9 @@ if [ "${gamename}" == "ARK: Survival Evolved" ]; then
 elif [ "${gamename}" == "Ballistic Overkill" ]; then
 	glibcrequired="2.15"
 	glibcfix="yes"
+elif [ "${gamename}" == "Battalion 1944" ]; then
+	glibcrequired="2.17"
+	glibcfix="no"
 elif [ "${gamename}" == "Base Defense" ]; then
 	glibcrequired="2.14"
 	glibcfix="no"

+ 18 - 0
lgsm/functions/info_messages.sh

@@ -507,6 +507,22 @@ fn_info_message_ballisticoverkill(){
 	} | column -s $'\t' -t
 }
 
+fn_info_message_battalion1944(){
+	echo -e "netstat -atunp | grep BattalionServ"
+	echo -e ""
+	{
+		echo -e "DESCRIPTION\tDIRECTION\tPORT\tPROTOCOL"
+		echo -e "> Game\tINBOUND\t${port}\tudp"
+		# Don't do arithmetics if ever the port wasn't a numeric value
+		# unconfirmed - http://wiki.battaliongame.com/Community_Servers#Firewalls_.2F_Port_Forwarding
+		if [ "${port}" -eq "${port}" ]; then
+			echo -e "> Steam\tINBOUND\t$((port+1))\tudp"
+			echo -e "> Unused\tINBOUND\t$((port+2))\ttcp"
+		fi
+		echo -e "> Query\tINBOUND\t${queryport}\tudp"
+	} | column -s $'\t' -t
+}
+
 fn_info_message_cod(){
 	echo -e "netstat -atunp | grep cod_lnxded"
 	echo -e ""
@@ -997,6 +1013,8 @@ fn_info_message_select_engine(){
 		fn_info_message_ark
 	elif [ "${gamename}" == "Ballistic Overkill" ]; then
 		fn_info_message_ballisticoverkill
+	elif [ "${gamename}" == "Battalion 1944" ]; then
+		fn_info_message_battalion1944
 	elif [ "${gamename}" == "Call of Duty" ]; then
 		fn_info_message_cod
 	elif [ "${gamename}" == "Call of Duty: United Offensive" ]; then

+ 7 - 0
lgsm/functions/install_config.sh

@@ -159,6 +159,13 @@ elif [ "${gamename}" == "Base Defense" ]; then
 	fn_fetch_default_config
 	fn_default_config_remote
 	fn_set_config_vars
+elif [ "${gamename}" == "Battalion 1944" ]; then
+	gamedirname="Battalion1944"
+	fn_check_cfgdir
+	array_configs+=( DefaultGame.ini )
+	fn_fetch_default_config
+	fn_default_config_remote
+	fn_set_config_vars
 elif [ "${gamename}" == "Battlefield: 1942" ]; then
 	gamedirname="Battlefield1942"
 	array_configs+=( serversettings.con )