Skip to content

Commit 9c36976

Browse files
committed
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.
1 parent bdfc6e5 commit 9c36976

File tree

1 file changed

+4
-6
lines changed

1 file changed

+4
-6
lines changed

lgsm/modules/alert.sh

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -10,13 +10,9 @@ moduleselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"
1010
# Generates alert log of the details at the time of the alert.
1111
# Used with email alerts.
1212
fn_alert_log() {
13-
info_distro.sh
14-
info_game.sh
15-
info_messages.sh
1613
if [ -f "${alertlog}" ]; then
1714
rm -f "${alertlog:?}"
1815
fi
19-
2016
{
2117
fn_info_messages_head
2218
fn_info_messages_distro
@@ -218,8 +214,9 @@ fn_alert_info() {
218214
alertcolourdec="2003199"
219215
}
220216

221-
# Images
222-
alerticon="https://raw.githubusercontent.com/${githubuser}/${githubrepo}/${githubbranch}/lgsm/data/gameicons/${shortname}-icon.png"
217+
info_distro.sh
218+
info_game.sh
219+
info_messages.sh
223220

224221
if [ "${alert}" == "permissions" ]; then
225222
fn_alert_permissions
@@ -260,6 +257,7 @@ else
260257
fi
261258

262259
alerttitle="${alertemoji} ${alertaction} - ${servername} ${alertemoji}"
260+
alerticon="https://raw.githubusercontent.com/${githubuser}/${githubrepo}/${githubbranch}/lgsm/data/gameicons/${shortname}-icon.png"
263261

264262
# Generate alert log.
265263
fn_alert_log

0 commit comments

Comments
 (0)