소스 검색

Got server password working

Daniel Gibbs 10 년 전
부모
커밋
9b9b96ab3b
1개의 변경된 파일3개의 추가작업 그리고 2개의 파일을 삭제
  1. 3 2
      functions/info_config.sh

+ 3 - 2
functions/info_config.sh

@@ -2,7 +2,7 @@
 # LGSM info_config.sh function
 # LGSM info_config.sh function
 # Author: Daniel Gibbs
 # Author: Daniel Gibbs
 # Website: http://gameservermanagers.com
 # Website: http://gameservermanagers.com
-lgsm_version="060116"
+lgsm_version="190216"
 
 
 # Description: Gets specific details from config files.
 # Description: Gets specific details from config files.
 
 
@@ -170,7 +170,8 @@ elif [ "${engine}" == "idtech3" ]; then
 
 
 	# server password
 	# server password
 	if [ -f "${servercfgfullpath}" ]; then
 	if [ -f "${servercfgfullpath}" ]; then
-		serverpassword=$(grep "set g_password" "${servercfgfullpath}" | grep -v "//" | sed -e 's/set g_password//g' | tr -d '=\"; ')
+
+		serverpassword=$(grep "set g_password" "${servercfgfullpath}" | sed -e 's/set g_password//g' | tr -d '=\"; '| cut -f1 -d "/")
 		if [ ! -n "${serverpassword}" ]; then
 		if [ ! -n "${serverpassword}" ]; then
 			serverpassword="NOT SET"
 			serverpassword="NOT SET"
 		fi
 		fi