Skip to content

Commit

Permalink
Only broadcast valid messages
Browse files Browse the repository at this point in the history
  • Loading branch information
Dashboy1998 committed Feb 19, 2024
1 parent e58143e commit f96ef24
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions scripts/helper_functions.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down

0 comments on commit f96ef24

Please sign in to comment.