Browse Source

feat(vhserver): add server query

add query port to details


correct inbound direction
Daniel Gibbs 5 years ago
parent
commit
ab4fc05218

+ 2 - 2
lgsm/config-default/config-lgsm/vhserver/_default.cfg

@@ -138,8 +138,8 @@ stopmode="2"
 # 3: gamedig
 # 4: gsquery
 # 5: tcp
-querymode="1"
-querytype=""
+querymode="2"
+querytype="protocol-valve"
 
 ## Console type
 consoleverbose="yes"

+ 3 - 2
lgsm/functions/info_messages.sh

@@ -1259,9 +1259,9 @@ fn_info_message_unreal(){
 		fi
 		if [ "${appid}" ]; then
 			if [ "${appid}" == "223250" ]; then
-				echo -e "< Steam\tINBOUND\t20610\tudp"
+				echo -e "> Steam\tINBOUND\t20610\tudp"
 			else
-				echo -e "< Steam\tINBOUND\t20660\tudp"
+				echo -e "> Steam\tINBOUND\t20660\tudp"
 			fi
 		fi
 		echo -e "> Web Admin\tINBOUND\t${webadminport}\ttcp\tListenPort=${webadminport}"
@@ -1347,6 +1347,7 @@ fn_info_message_vh(){
 	{
 		echo -e "${lightblue}DESCRIPTION\tDIRECTION\tPORT\tPROTOCOL${default}"
 		echo -e "> Game\tINBOUND\t${port}\tudp"
+		echo -e "> Query\tINBOUND\t${queryport}\tudp"
 	} | column -s $'\t' -t
 }
 

+ 10 - 0
lgsm/functions/info_parms.sh

@@ -235,6 +235,14 @@ fn_info_parms_ut(){
 	port=${port:-"0"}
 }
 
+fn_info_parms_vh(){
+	port=${port:-"0"}
+	queryport=$((port + 1))
+	gameworld=${gameworld:-"NOT SET"}
+	serverpassword=${serverpassword:-"NOT SET"}
+	servername=${servername:-"NOT SET"}
+}
+
 fn_info_parms_wf(){
 	port=${port:-"0"}
 	queryport="${port:-"0"}"
@@ -293,6 +301,8 @@ elif [ "${shortname}" == "tu" ]; then
 	fn_info_parms_towerunite
 elif [ "${shortname}" == "tw" ]; then
 	fn_info_parms_teeworlds
+elif [ "${shortname}" == "vh" ]; then
+	fn_info_parms_vh
 elif [ "${shortname}" == "mh" ]; then
 	fn_info_parms_mordhau
 elif [ "${shortname}" == "mta" ]; then