Ver código fonte

moved emailnotification to legacy code fixes

Daniel Gibbs 9 anos atrás
pai
commit
53e88342be
2 arquivos alterados com 9 adições e 5 exclusões
  1. 2 2
      lgsm/functions/alert.sh
  2. 7 3
      lgsm/functions/core_functions.sh

+ 2 - 2
lgsm/functions/alert.sh

@@ -41,9 +41,9 @@ elif [ "${alert}" == "test" ]; then
 	fn_alert_test
 	fn_alert_test
 fi
 fi
 
 
-if [ "${emailnotification}" == "on" ]||[ "${emailalert}" == "on" ]&&[ -n "${email}" ]; then
+if [ "${emailalert}" == "on" ]&&[ -n "${email}" ]; then
 	alert_email.sh
 	alert_email.sh
-elif [ "${emailnotification}" != "on" ]||[ "${emailalert}" != "on" ]&&[ "${function_selfname}" == "command_test_alert.sh" ]; then
+elif [ "${emailalert}" != "on" ]&&[ "${function_selfname}" == "command_test_alert.sh" ]; then
 	fn_print_warn_nl "Email alerts not enabled"
 	fn_print_warn_nl "Email alerts not enabled"
 	fn_script_log_warn "Email alerts not enabled"
 	fn_script_log_warn "Email alerts not enabled"
 elif [ -z "${email}" ]&&[ "${function_selfname}" == "command_test_alert.sh" ]; then
 elif [ -z "${email}" ]&&[ "${function_selfname}" == "command_test_alert.sh" ]; then

+ 7 - 3
lgsm/functions/core_functions.sh

@@ -5,9 +5,13 @@
 # Description: Defines all functions to allow download and execution of functions using fn_fetch_function.
 # Description: Defines all functions to allow download and execution of functions using fn_fetch_function.
 # This function is called first before any other function. Without this file other functions will not load.
 # This function is called first before any other function. Without this file other functions will not load.
 
 
-# Fix for TeamSpeak 3 scripts using gamename="Teamspeak 3"
-if [ "${gamename}" == "Teamspeak 3" ]; then 
-	gamename="TeamSpeak 3" 
+# Fixes legacy code
+if [ "${gamename}" == "Teamspeak 3" ]; then
+	gamename="TeamSpeak 3"
+fi
+
+if [ "${emailnotification}" == "on" ]; then
+    emailalert="on"
 fi
 fi
 
 
 # Code/functions for legacy servers
 # Code/functions for legacy servers