diff --git a/scripts/helper_functions.sh b/scripts/helper_functions.sh index efeb5c34b..96db82ad2 100644 --- a/scripts/helper_functions.sh +++ b/scripts/helper_functions.sh @@ -179,9 +179,9 @@ broadcast_command() { # Replaces spaces with underscore local message="${1// /_}" if [[ $TEXT = *[![:ascii:]]* ]]; then - LogWarn "Broadcast message contains non-ascii characters: \"${message}\"" - fi - if ! RCON "broadcast ${message}"; then + LogWarn "Unable to broadcast since the message contains non-ascii characters: \"${message}\"" + return_val=1 + elif ! RCON "broadcast ${message}"; then return_val=1 fi return "$return_val"