Skip to content
Snippets Groups Projects
Verified Commit 6026790a authored by Bell's avatar Bell :on:
Browse files

feat: 동일 상태여도 조회 진행 여부 파악을 위해 . 출력하도록 수정

parent fea783d4
No related merge requests found
Pipeline #2508 passed
#!/bin/sh
before_players=""
same_count=0
print_players() {
PLAYERS=$(./show_players.sh)
......@@ -11,17 +10,9 @@ print_players() {
CURRENT_DATE=$(TZ=Asia/Seoul date "+%y-%m-%d %H:%M:%S")
echo "[KST $CURRENT_DATE] PLAYERS = $PLAYERS"
same_count=0
before_players="$PLAYERS"
else
# NOTE: 30초간 접속자 동일할 시 점 하나 찍음
if [ "$same_count" -gt 6 ]; then
echo -n "."
same_count=0
fi
same_count=$((same_count + 1))
fi
}
......
#!/bin/sh
/rcon ShowPlayers | sed "1d;/cli: execute: auth: rcon:/d" | cut -d ',' -f1 | sed -n "s/.*/'&'/;1{h;d};H;\${x;s/\n/,/g;p;q}"
PLAYERS=$(/rcon ShowPlayers | sed "1d;/cli: execute: auth: rcon:/d" | cut -d ',' -f1 | sed -n "s/.*/'&'/;1{h;d};H;\${x;s/\n/,/g;p;q}")
echo "$PLAYERS"
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment