Procházet zdrojové kódy

gametracker.com will always use extip if available

Daniel Gibbs před 7 roky
rodič
revize
bf31ed493a

+ 1 - 1
lgsm/functions/alert_pushover.sh

@@ -24,7 +24,7 @@ else
 	alertpriority="0"
 fi
 
-pushoversend=$(${curlpath} -sS -F token="${pushovertoken}" -F user="${pushoveruserkey}" -F html="1" -F sound="${alertsound}"  -F priority="${alertpriority}" -F title="${alertemoji} ${alertsubject} ${alertemoji}" -F message=" <b>Message</b><br>${alertbody}<br><br><b>Game</b><br>${gamename}<br><br><b>Server name</b><br>${servername}<br><br><b>Hostname</b><br>${HOSTNAME}<br><br><b>Server IP</b><br><a href='https://www.gametracker.com/server_info/${ip}:${port}'>${ip}:${port}</a><br><br><b>More info</b><br><a href='${alerturl}'>${alerturl}</a>" "https://api.pushover.net/1/messages.json" | grep errors)
+pushoversend=$(${curlpath} -sS -F token="${pushovertoken}" -F user="${pushoveruserkey}" -F html="1" -F sound="${alertsound}"  -F priority="${alertpriority}" -F title="${alertemoji} ${alertsubject} ${alertemoji}" -F message=" <b>Message</b><br>${alertbody}<br><br><b>Game</b><br>${gamename}<br><br><b>Server name</b><br>${servername}<br><br><b>Hostname</b><br>${HOSTNAME}<br><br><b>Server IP</b><br><a href='https://www.gametracker.com/server_info/${extip:-$ip}:${port}'>${extip:-$ip}:${port}</a><br><br><b>More info</b><br><a href='${alerturl}'>${alerturl}</a>" "https://api.pushover.net/1/messages.json" | grep errors)
 
 if [ -n "${pushoversend}" ]; then
 	fn_print_fail_nl "Sending Pushover alert: ${pushoversend}"

+ 1 - 1
lgsm/functions/alert_telegram.sh

@@ -12,7 +12,7 @@ json=$(cat <<EOF
 {
 	"chat_id": "${telegramchatid}",
 	"parse_mode": "HTML",
-	"text": "${alertemoji} <b>${alertsubject}</b> ${alertemoji}\n\n<b>Message</b>\n${alertbody}\n\n<b>Game</b>\n${gamename}\n\n<b>Server name</b>\n${servername}\n\n<b>Hostname</b>\n${HOSTNAME}\n\n<b>Server IP</b>\n<a href='https://www.gametracker.com/server_info/${ip}:${port}'>${ip}:${port}</a>\n\n<b>More info</b>\n<a href='${alerturl}'>${alerturl}</a>",
+	"text": "${alertemoji} <b>${alertsubject}</b> ${alertemoji}\n\n<b>Message</b>\n${alertbody}\n\n<b>Game</b>\n${gamename}\n\n<b>Server name</b>\n${servername}\n\n<b>Hostname</b>\n${HOSTNAME}\n\n<b>Server IP</b>\n<a href='https://www.gametracker.com/server_info/${extip:-$ip}:${port}'>${extip:-$ip}:${port}</a>\n\n<b>More info</b>\n<a href='${alerturl}'>${alerturl}</a>",
 	"disable_web_page_preview": "yes",
 EOF
 )