Skip to content

Commit 6f1f129

Browse files
authored
Merge pull request #80 from GBenoitG/fix/parsing_char_name
Fix parsing of char_name for webhook
2 parents 82f376c + fe1eeb1 commit 6f1f129

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" == "[userid:"*"] player"*"connected islocalplayer="* ]]; 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)