Skip to content

Commit

Permalink
fix helper function
Browse files Browse the repository at this point in the history
  • Loading branch information
Luatan committed Feb 11, 2024
1 parent 220db5b commit c71e549
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 @@ -71,8 +71,8 @@ isExecutable() {
# Returns the player count if rcon is enabled
get_player_count() {
if [ "${RCON_ENABLED,,}" != true ]; then
return 0
echo 0
fi
PLAYERLIST=$(rcon-cli -c /home/steam/server/rcon.yaml "ShowPlayers")
return "$(echo -n "$PLAYERLIST" | wc -l)"
player_list=$(rcon-cli -c /home/steam/server/rcon.yaml "ShowPlayers")
echo -n "${player_list}" | wc -l
}

0 comments on commit c71e549

Please sign in to comment.