Browse Source
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.
4696-bug-discord-alert-on-update-uses-the-old-version-not-the-new-one
Daniel Gibbs
1 week ago
Failed to extract signature
1 changed files with
4 additions and
6 deletions
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.
# Generates alert log of the details at the time of the alert.
# Used with email alerts.
# Used with email alerts.
fn_alert_log( ) {
fn_alert_log( ) {
info_distro.sh
info_game.sh
info_messages.sh
if [ -f " ${ alertlog } " ] ; then
if [ -f " ${ alertlog } " ] ; then
rm -f " ${ alertlog : ? } "
rm -f " ${ alertlog : ? } "
fi
fi
{
{
fn_info_messages_head
fn_info_messages_head
fn_info_messages_distro
fn_info_messages_distro
@ -218,8 +214,9 @@ fn_alert_info() {
alertcolourdec = "2003199"
alertcolourdec = "2003199"
}
}
# Images
info_distro.sh
alerticon = " https://raw.githubusercontent.com/ ${ githubuser } / ${ githubrepo } / ${ githubbranch } /lgsm/data/gameicons/ ${ shortname } -icon.png "
info_game.sh
info_messages.sh
if [ " ${ alert } " = = "permissions" ] ; then
if [ " ${ alert } " = = "permissions" ] ; then
fn_alert_permissions
fn_alert_permissions
@ -260,6 +257,7 @@ else
fi
fi
alerttitle = " ${ alertemoji } ${ alertaction } - ${ servername } ${ alertemoji } "
alerttitle = " ${ alertemoji } ${ alertaction } - ${ servername } ${ alertemoji } "
alerticon = " https://raw.githubusercontent.com/ ${ githubuser } / ${ githubrepo } / ${ githubbranch } /lgsm/data/gameicons/ ${ shortname } -icon.png "
# Generate alert log.
# Generate alert log.
fn_alert_log
fn_alert_log