Daniel Gibbs 8 лет назад
Родитель
Сommit
1353d8c496
2 измененных файлов с 2 добавлено и 7 удалено
  1. 1 5
      lgsm/functions/alert_discord.sh
  2. 1 2
      lgsm/functions/alert_telegram.sh

+ 1 - 5
lgsm/functions/alert_discord.sh

@@ -5,10 +5,6 @@
 # Website: https://gameservermanagers.com
 # Description: Sends Discord alert including the server status.
 
-local commandname="ALERT"
-local commandaction="Alert"
-local function_selfname="$(basename $(readlink -f "${BASH_SOURCE[0]}"))"
-
 json=$(cat <<EOF
 {
 "username":"LinuxGSM",
@@ -49,7 +45,7 @@ json=$(cat <<EOF
 				"name": "More info",
 				"value": "${alerturl}"
 			}
-			]
+		]
 	}]
 }
 EOF

+ 1 - 2
lgsm/functions/alert_telegram.sh

@@ -8,7 +8,6 @@ local commandname="ALERT"
 local commandaction="Alert"
 local function_selfname="$(basename $(readlink -f "${BASH_SOURCE[0]}"))"
 
-
 json=$(cat <<EOF
 {
 	"chat_id": "${telegramchatid}",
@@ -20,7 +19,7 @@ EOF
 
 fn_print_dots "Sending Telegram alert"
 sleep 0.5
-telegramsend=$(curl -sSL -H "Content-Type: application/json" -X POST -d """${json}""" "https://api.telegram.org/bot${telegramtoken}/sendMessage" | grep -Po '(?<="description":").*?(?=")'|uniq)
+telegramsend=$(curl -sSL -H "Content-Type: application/json" -X POST -d """${json}""" "https://api.telegram.org/bot${telegramtoken}/sendMessage")
 
 if [ -n "${telegramsend}" ]; then
 	fn_print_fail_nl "Sending Telegram alert: ${telegramsend}"