Allow arbitrary variables in notify message

This commit is contained in:
Ben Peddell 2019-11-22 19:46:17 +10:00
parent 40e373f70e
commit 00abbf0182

View File

@ -584,6 +584,12 @@ function notify(){
msg="${msg//\{msg\}/${1}}"
msg="${msg//\{instance\}/${instance}}"
msg="${msg//\{server\}/${HOSTNAME}}"
for v in "${!notifyvar_@}"; do
vn="${v#notifyvar_}"
msg="${msg//\{${vn}\}/${!v}}"
done
notifyDiscord "$msg"
notifyOverride "$msg"
fi