From 9c36976573aef1493c1da8c5cd64a4454943d83b Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Wed, 13 Aug 2025 00:22:07 +0000 Subject: [PATCH] fix(alert): resolve issue with servername not always being listed in title * Moved `info_distro.sh`, `info_game.sh`, and `info_messages.sh` calls to the top of the `fn_alert_log` function for better clarity. * Updated `alerticon` assignment to maintain consistency in alert information handling. --- lgsm/modules/alert.sh | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/lgsm/modules/alert.sh b/lgsm/modules/alert.sh index d0f80baa8..a36ad26a4 100644 --- a/lgsm/modules/alert.sh +++ b/lgsm/modules/alert.sh @@ -10,13 +10,9 @@ moduleselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" # Generates alert log of the details at the time of the alert. # Used with email alerts. fn_alert_log() { - info_distro.sh - info_game.sh - info_messages.sh if [ -f "${alertlog}" ]; then rm -f "${alertlog:?}" fi - { fn_info_messages_head fn_info_messages_distro @@ -218,8 +214,9 @@ fn_alert_info() { alertcolourdec="2003199" } -# Images -alerticon="https://raw.githubusercontent.com/${githubuser}/${githubrepo}/${githubbranch}/lgsm/data/gameicons/${shortname}-icon.png" +info_distro.sh +info_game.sh +info_messages.sh if [ "${alert}" == "permissions" ]; then fn_alert_permissions @@ -260,6 +257,7 @@ else fi alerttitle="${alertemoji} ${alertaction} - ${servername} ${alertemoji}" +alerticon="https://raw.githubusercontent.com/${githubuser}/${githubrepo}/${githubbranch}/lgsm/data/gameicons/${shortname}-icon.png" # Generate alert log. fn_alert_log