Jelajahi Sumber

Added CoD: WaW

Daniel Gibbs 9 tahun lalu
induk
melakukan
6103215513

+ 12 - 1
lgsm/functions/command_details.sh

@@ -308,7 +308,7 @@ fn_details_ports(){
 		fi
 		fi
 	done
 	done
 	# engines that require editing in the script file
 	# engines that require editing in the script file
-	local ports_edit_array=( "starbound" "spark" "source" "goldsource" "Rust" "Hurtworld" "unreal4")
+	local ports_edit_array=( "Hurtworld" "iw3.0" "goldsource" "Rust" "spark" "source" "starbound" "unreal4" )
 	for port_edit in "${ports_edit_array[@]}"
 	for port_edit in "${ports_edit_array[@]}"
 	do
 	do
 		if [ "${engine}" == "${port_edit}" ]||[ "${gamename}" == "${port_edit}" ]; then
 		if [ "${engine}" == "${port_edit}" ]||[ "${gamename}" == "${port_edit}" ]; then
@@ -368,6 +368,15 @@ fn_details_cod2(){
 	} | column -s $'\t' -t
 	} | column -s $'\t' -t
 }
 }
 
 
+fn_details_codwaw(){
+	echo -e "netstat -atunp | grep codwaw_lnxded"
+	echo -e ""
+	{
+		echo -e "DESCRIPTION\tDIRECTION\tPORT\tPROTOCOL"
+		echo -e "> Game\tINBOUND\t${port}\tudp"
+	} | column -s $'\t' -t
+}
+
 fn_details_dontstarve(){
 fn_details_dontstarve(){
 	echo -e "netstat -atunp | grep dontstarve"
 	echo -e "netstat -atunp | grep dontstarve"
 	echo -e ""
 	echo -e ""
@@ -730,6 +739,8 @@ fn_display_details() {
 		fn_details_coduo
 		fn_details_coduo
 	elif [ "${gamename}" == "Call of Duty 2" ]; then
 	elif [ "${gamename}" == "Call of Duty 2" ]; then
 		fn_details_cod2
 		fn_details_cod2
+	elif [ "${gamename}" == "Call of Duty: World at War" ]; then
+		fn_details_codwaw
 	elif [ "${gamename}" == "Hurtworld" ]; then
 	elif [ "${gamename}" == "Hurtworld" ]; then
 		fn_details_hurtworld
 		fn_details_hurtworld
 	elif [ "${gamename}" == "QuakeWorld" ]; then
 	elif [ "${gamename}" == "QuakeWorld" ]; then

+ 1 - 1
lgsm/functions/command_monitor.sh

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

+ 1 - 1
lgsm/functions/core_getopt.sh

@@ -622,7 +622,7 @@ case "${getopt}" in
 
 
 if [ "${gamename}" == "Mumble" ]; then
 if [ "${gamename}" == "Mumble" ]; then
 	fn_getopt_mumble
 	fn_getopt_mumble
-elif [ "${gamename}" == "Battlefield: 1942" ]||[ "${gamename}" == "Call of Duty" ]||[ "${gamename}" == "Call of Duty: United Offensive" ]||[ "${gamename}" == "Call of Duty 2" ]||[ "${gamename}" == "QuakeWorld" ]||[ "${gamename}" == "Quake 2" ]||[ "${gamename}" == "Quake 3: Arena" ]||[ "${gamename}" == "Wolfenstein: Enemy Territory" ]; then
+elif [ "${gamename}" == "Battlefield: 1942" ]||[ "${gamename}" == "Call of Duty" ]||[ "${gamename}" == "Call of Duty: United Offensive" ]||[ "${gamename}" == "Call of Duty 2" ]||[ "${gamename}" == "Call of Duty: World at War" ]||[ "${gamename}" == "QuakeWorld" ]||[ "${gamename}" == "Quake 2" ]||[ "${gamename}" == "Quake 3: Arena" ]||[ "${gamename}" == "Wolfenstein: Enemy Territory" ]; then
 	fn_getopt_generic_no_update
 	fn_getopt_generic_no_update
 elif [ "${engine}" == "lwjgl2" ]; then
 elif [ "${engine}" == "lwjgl2" ]; then
 	fn_getopt_minecraft
 	fn_getopt_minecraft

+ 3 - 1
lgsm/functions/gsquery.py

@@ -28,6 +28,8 @@ class GameServer:
             self.query_prompt_string = b'\xff\xff\xff\xffgetstatus'
             self.query_prompt_string = b'\xff\xff\xff\xffgetstatus'
         elif self.option.engine == 'iw2.0':
         elif self.option.engine == 'iw2.0':
             self.query_prompt_string = b'\xff\xff\xff\xffgetstatus'
             self.query_prompt_string = b'\xff\xff\xff\xffgetstatus'
+        elif self.option.engine == 'iw3.0':
+            self.query_prompt_string = b'\xff\xff\xff\xffgetstatus'            
         elif self.option.engine == 'quake':
         elif self.option.engine == 'quake':
             self.query_prompt_string = b'\xff\xff\xff\xffstatus\x00'
             self.query_prompt_string = b'\xff\xff\xff\xffstatus\x00'
         elif self.option.engine == 'quakelive':
         elif self.option.engine == 'quakelive':
@@ -115,7 +117,7 @@ if __name__ == '__main__':
         action='store',
         action='store',
         dest='engine',
         dest='engine',
         default=False,
         default=False,
-        help='Engine type: avalanche, goldsource, idtech2, idtech3, iw2.0, realvirtuality, quake, quakelive, refractor, spark, source, unity3d, unreal, unreal2.'
+        help='Engine type: avalanche, goldsource, idtech2, idtech3, iw2.0, iw3.0, realvirtuality, quake, quakelive, refractor, spark, source, unity3d, unreal, unreal2.'
     )
     )
     parser.add_option(
     parser.add_option(
         '-v', '--verbose',
         '-v', '--verbose',

+ 17 - 0
lgsm/functions/info_config.sh

@@ -94,6 +94,20 @@ fn_info_config_cod2(){
 	fi
 	fi
 }
 }
 
 
+fn_info_config_codwaw(){
+	if [ ! -f "${servercfgfullpath}" ]; then
+		servername="${unavailable}"
+		rconpassword="${unavailable}"
+	else
+		servername=$(grep "sv_hostname " "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^\//d' -e 's/set sv_hostname //g' | tr -d '=\";,:' | xargs)
+		rconpassword=$(grep "rconpassword" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^\//d' -e 's/set rconpassword //g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//')
+
+		# Not Set
+		servername=${servername:-"NOT SET"}
+		rconpassword=${rconpassword=:-"NOT SET"}
+	fi
+}
+
 fn_info_config_dontstarve(){
 fn_info_config_dontstarve(){
 	if [ ! -f "${servercfgfullpath}" ]; then
 	if [ ! -f "${servercfgfullpath}" ]; then
 		servername="${unavailable}"
 		servername="${unavailable}"
@@ -542,6 +556,9 @@ elif [ "${gamename}" == "Call of Duty" ]||[ "${gamename}" == "Call of Duty: Unit
 # Call of Duty 2
 # Call of Duty 2
 elif [ "${gamename}" == "Call of Duty 2" ]; then
 elif [ "${gamename}" == "Call of Duty 2" ]; then
 	fn_info_config_cod2
 	fn_info_config_cod2
+# Call of Duty: World at War
+elif [ "${gamename}" == "Call of Duty: World at War" ]; then
+	fn_info_config_codwaw
 # Dont Starve Together
 # Dont Starve Together
 elif [ "${engine}" == "dontstarve" ]; then
 elif [ "${engine}" == "dontstarve" ]; then
 	fn_info_config_dontstarve
 	fn_info_config_dontstarve

+ 3 - 0
lgsm/functions/info_glibc.sh

@@ -23,6 +23,9 @@ elif [ "${gamename}" == "Call of Duty 2" ]; then
 elif [ "${gamename}" == "Call of Duty: United Offensive" ]; then
 elif [ "${gamename}" == "Call of Duty: United Offensive" ]; then
 	glibcrequired="2.1"
 	glibcrequired="2.1"
 	glibcfix="no"
 	glibcfix="no"
+elif [ "${gamename}" == "Call of Duty: World at War" ]; then
+	glibcrequired="2.3.2"
+	glibcfix="no"
 elif [ "${gamename}" == "Day of Infamy" ]; then
 elif [ "${gamename}" == "Day of Infamy" ]; then
 	glibcrequired="2.15"
 	glibcrequired="2.15"
 	glibcfix="yes"
 	glibcfix="yes"