Selaa lähdekoodia

Merge branch 'feature/boserver'

Conflicts:
	BallisticOverkill/boserver
	lgsm/functions/info_glibc.sh
Daniel Gibbs 9 vuotta sitten
vanhempi
commit
644a41eed8

+ 3 - 3
lgsm/functions/check_steamcmd.sh

@@ -18,17 +18,17 @@ fn_install_steamcmd(){
 fn_check_steamcmd_user(){
 	# Checks if steamuser is setup.
 	if [ "${steamuser}" == "username" ]; then
-		fn_print_fail_nl "Steam login not set. Update steamuser in ${selfname}."
+		fn_print_fail_nl "Steam login not set. Update steamuser in ${selfname}"
 		echo "	* Change steamuser=\"username\" to a valid steam login."
 		if [ -d "${scriptlogdir}" ]; then
-			fn_script_log_fatal "Steam login not set. Update steamuser in ${selfname}."
+			fn_script_log_fatal "Steam login not set. Update steamuser in ${selfname}"
 		fi
 		core_exit.sh
 	fi
 	# Anonymous user is set if steamuser is missing
 	if [ -z "${steamuser}" ]; then
 		if [ -d "${scriptlogdir}" ]; then
-			fn_script_log_info "Using anonymous Steam login."
+			fn_script_log_info "Using anonymous Steam login"
 		fi
 		steamuser="anonymous"
 		steampass=''

+ 17 - 5
lgsm/functions/command_details.sh

@@ -315,7 +315,7 @@ fn_details_ports(){
 
 	parmslocation="${red}UNKNOWN${default}"
 	# engines/games that require editing in the config file
-	local ports_edit_array=( "avalanche" "dontstarve" "idtech2" "idtech3" "idtech3_ql" "lwjgl2" "projectzomboid" "quake" "refractor" "realvirtuality" "renderware" "seriousengine35" "teeworlds" "terraria" "unreal" "unreal2" "unreal3" "TeamSpeak 3" "Mumble" "7 Days To Die" )
+	local ports_edit_array=( "avalanche" "Ballistic Overkill" "dontstarve" "idtech2" "idtech3" "idtech3_ql" "lwjgl2" "projectzomboid" "quake" "refractor" "realvirtuality" "renderware" "seriousengine35" "teeworlds" "terraria" "unreal" "unreal2" "unreal3" "TeamSpeak 3" "Mumble" "7 Days To Die" )
 	for port_edit in "${ports_edit_array[@]}"
 	do
 		if [ "${engine}" == "${port_edit}" ]||[ "${gamename}" == "${port_edit}" ]; then
@@ -355,7 +355,7 @@ fn_details_ark(){
 		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
-		if [ "${port}" -eq "${port}" ]; then 
+		if [ "${port}" -eq "${port}" ]; then
 			echo -e "> RAW\tINBOUND\t$((port+1))\tudp"
 		fi
 		echo -e "> Query\tINBOUND\t${queryport}\tudp"
@@ -363,6 +363,16 @@ fn_details_ark(){
 	} | column -s $'\t' -t
 }
 
+fn_details_ballisticoverkill(){
+	echo -e "netstat -atunp | grep BODS.x86"
+	echo -e ""
+	{
+		echo -e "DESCRIPTION\tDIRECTION\tPORT\tPROTOCOL"
+		echo -e "> Game/RCON\tINBOUND\t${port}\tudp"
+		echo -e "> Query\tINBOUND\t${queryport}\tudp"
+	} | column -s $'\t' -t
+}
+
 fn_details_avalanche(){
 	echo -e "netstat -atunp | grep Jcmp-Server"
 	echo -e ""
@@ -539,7 +549,7 @@ fn_details_realvirtuality(){
 		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
-		if [ "${port}" -eq "${port}" ]; then 
+		if [ "${port}" -eq "${port}" ]; then
 			echo -e "> Steam: Query\tINBOUND\t$((port+1))\tudp"
 			echo -e "> Steam: Master traffic\tINBOUND\t$((port+2))\tudp"
 			echo -e "> Undocumented Port\tINBOUND\t$((port+3))\tudp"
@@ -814,6 +824,8 @@ fn_display_details() {
 		fn_details_sdtd
 	elif [ "${gamename}" == "ARK: Survival Evolved" ]; then
 		fn_details_ark
+	elif [ "${gamename}" == "Ballistic Overkill" ]; then
+		fn_details_ballisticoverkill
 	elif [ "${gamename}" == "Call of Duty" ]; then
 		fn_details_cod
 	elif [ "${gamename}" == "Call of Duty: United Offensive" ]; then
@@ -825,7 +837,7 @@ fn_display_details() {
 	elif [ "${gamename}" == "Call of Duty: World at War" ]; then
 		fn_details_codwaw
 	elif [ "${gamename}" == "Factorio" ]; then
-		fn_details_factorio    
+		fn_details_factorio
 	elif [ "${gamename}" == "Hurtworld" ]; then
 		fn_details_hurtworld
 	elif [ "${gamename}" == "QuakeWorld" ]; then
@@ -841,7 +853,7 @@ fn_display_details() {
 	elif [ "${gamename}" == "Tower Unite" ]; then
 		fn_details_towerunite
 	elif [ "${gamename}" == "Multi Theft Auto" ]; then
-		fn_details_mta    
+		fn_details_mta
 	elif [ "${gamename}" == "Mumble" ]; then
 		fn_details_mumble
 	elif [ "${gamename}" == "Rust" ]; then

+ 27 - 1
lgsm/functions/info_config.sh

@@ -568,6 +568,29 @@ fn_info_config_unreal(){
 	fi
 }
 
+fn_info_config_ballistic_overkill(){
+	if [ ! -f "${servercfgfullpath}" ]; then
+		servername="${unavailable}"
+		serverpassword="${unavailable}"
+		port="${zero}"
+		queryport="${zero}"
+		maxplayers="${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]*$//')
+		port=$(grep "ServerPort=" "${servercfgfullpath}" | tr -cd '[:digit:]')
+		queryport=$((port + 1))
+		maxplayers=$(grep "MaxPlayers=" "${servercfgfullpath}" | tr -cd '[:digit:]')
+
+		# Not Set
+		servername=${servername:-"NOT SET"}
+		serverpassword=${serverpassword:-"NOT SET"}
+		port=${port:-"0"}
+		queryport=${queryport:-"0"}
+		maxplayers=${maxplayers:-"NOT SET"}
+	fi
+}
+
 fn_info_config_sdtd(){
 	if [ ! -f "${servercfgfullpath}" ]; then
 		servername="${unavailable}"
@@ -660,6 +683,9 @@ if [ "${engine}" == "avalanche" ]; then
 # ARK: Survival Evolved
 elif [ "${gamename}" == "ARK: Survivial Evolved" ]; then
 	fn_info_config_ark
+# Ballistic Overkill
+elif [ "${gamename}" == "Ballistic Overkill" ]; then
+	fn_info_config_ballistic_overkill
 # Battlefield: 1942
 elif [ "${gamename}" == "Battlefield: 1942" ]; then
 	fn_info_config_bf1942
@@ -678,7 +704,7 @@ elif [ "${gamename}" == "Call of Duty: World at War" ]; then
 # Dont Starve Together
 elif [ "${engine}" == "dontstarve" ]; then
 	fn_info_config_dontstarve
-# Factorio	
+# Factorio
 elif [ "${gamename}" == "Factorio" ]; then
 	fn_info_config_factorio
 # Quake 2

+ 3 - 0
lgsm/functions/info_glibc.sh

@@ -9,6 +9,9 @@ local function_selfname="$(basename $(readlink -f "${BASH_SOURCE[0]}"))"
 if [ "${gamename}" == "ARK: Survival Evolved" ]; then
 	glibcrequired="2.15"
 	glibcfix="no"
+elif [ "${gamename}" == "Ballistic Overkill" ]; then
+	glibcrequired="2.15"
+	glibcfix="yes"
 elif [ "${gamename}" == "Black Mesa: Deathmatch" ]; then
 	glibcrequired="2.15"
 	glibcfix="yes"

+ 6 - 0
lgsm/functions/install_config.sh

@@ -144,6 +144,12 @@ elif [ "${gamename}" == "ARMA 3" ]; then
 	fn_fetch_default_config
 	fn_default_config_remote
 	fn_set_config_vars
+elif [ "${gamename}" == "Ballistic Overkill" ]; then
+	gamedirname="BallisticOverkill"
+	array_configs+=( config.txt )
+	fn_fetch_default_config
+	fn_default_config_remote
+	fn_set_config_vars
 elif [ "${gamename}" == "Battlefield: 1942" ]; then
 	gamedirname="Battlefield1942"
 	array_configs+=( serversettings.con )