Skip to content

Commit 25c8677

Browse files
committed
Fix parsing of char_name when 'is using new player' line not displayed in logs
1 parent 82f376c commit 25c8677

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

scripts/logfile-parser.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,11 @@ LogParser() {
66
while IFS= read -r line; do
77
echo "$line"
88

9-
if [[ "$line" == *"is using new name"* ]]; then
9+
if [[ "$line" == *"] player "* ]]; then
1010

1111
# Extract the steamid and character name
1212
steamid=$(echo "$line" | awk -F'[[]|[ :]+|[]]' '{print $3}')
13-
char_name=$(echo "$line" | awk -F'new name ' '{print $2}')
13+
char_name=$(echo "$line" | awk -F'player | connected' '{print $2}')
1414
LogDebug "Character Name: $char_name ($steamid)"
1515

1616
# Store character name for future use

0 commit comments

Comments
 (0)