UltimateByte преди 10 години
родител
ревизия
2d1422e255
променени са 1 файла, в които са добавени 23 реда и са изтрити 1 реда
  1. 23 1
      lgsm/functions/info_config.sh

+ 23 - 1
lgsm/functions/info_config.sh

@@ -211,6 +211,25 @@ fn_info_config_teamspeak3(){
 	fi
 	fi
 }
 }
 
 
+fn_info_config_mumble(){
+	if [ ! -f "${servercfgfullpath}" ]; then
+		port="64738"
+		queryport="${port}"
+	else
+		# check if the ip exists in the config file. Failing this will fall back to the default.
+		ipconfigcheck=${cat "${servercfgfullpath}" | grep "host=" | awk -F'=' '{ print $2}'
+		if [ -n "${ipconfigcheck}" ]; then
+			ip="${ipconfigcheck}"
+		fi
+		port=$(cat "${servercfgfullpath}" | grep 'port=' | awk -F'=' '{ print $2 }')
+		queryport="${port}"
+
+		# Not Set
+		port=${port:-"64738"}
+		queryport=${queryport:-"64738"}
+	fi
+}
+
 fn_info_config_teeworlds(){
 fn_info_config_teeworlds(){
 	if [ ! -f "${servercfgfullpath}" ]; then
 	if [ ! -f "${servercfgfullpath}" ]; then
 		servername="unnamed server"
 		servername="unnamed server"
@@ -318,8 +337,11 @@ elif [ "${engine}" == "source" ]||[ "${engine}" == "goldsource" ]; then
 # Starbound
 # Starbound
 elif [ "${engine}" == "starbound" ]; then
 elif [ "${engine}" == "starbound" ]; then
 	fn_info_config_starbound
 	fn_info_config_starbound
+#TeamSpeak
 elif [ "${gamename}" == "Teamspeak 3" ]; then
 elif [ "${gamename}" == "Teamspeak 3" ]; then
 	fn_info_config_teamspeak3
 	fn_info_config_teamspeak3
+elif [ "${gamename}" == "Mumble" ]; then
+	fn_info_config_mumble
 # Teeworlds
 # Teeworlds
 elif [ "${engine}" == "teeworlds" ]; then
 elif [ "${engine}" == "teeworlds" ]; then
 	fn_info_config_teeworlds
 	fn_info_config_teeworlds
@@ -329,4 +351,4 @@ elif [ "${engine}" == "terraria" ]; then
 # Unreal/Unreal 2 engine
 # Unreal/Unreal 2 engine
 elif [ "${engine}" == "unreal" ]||[ "${engine}" == "unreal2" ]; then
 elif [ "${engine}" == "unreal" ]||[ "${engine}" == "unreal2" ]; then
 	fn_info_config_unreal
 	fn_info_config_unreal
-fi
+fi