diff --git a/scripts/player_logging.sh b/scripts/player_logging.sh index 52574fceb..8ae38bb17 100644 --- a/scripts/player_logging.sh +++ b/scripts/player_logging.sh @@ -46,7 +46,9 @@ while true; do player_name=$( get_playername "${player}" ) LogInfo "${player_name} has left" broadcast_command "${player_name} has left" - DiscordMessage "Player Left" "${DISCORD_PLAYER_LEAVE_MESSAGE}" "failure" + + # Replace ${player_name} with actual player's name + DiscordMessage "Player Left" "${DISCORD_PLAYER_LEAVE_MESSAGE//\$\{player_name\}/${player_name}}" "failure" done # Notify Discord and log all players who have joined @@ -54,7 +56,9 @@ while true; do player_name=$( get_playername "${player}" ) LogInfo "${player_name} has joined" broadcast_command "${player_name} has joined" - DiscordMessage "Player Joined" "${DISCORD_PLAYER_JOIN_MESSAGE}" "success" + + # Replace ${player_name} with actual player's name + DiscordMessage "Player Joined" "${DISCORD_PLAYER_JOIN_MESSAGE//\$\{player_name\}/${player_name}}" "success" done old_player_list=("${current_player_list[@]}")