Skip to content

Commit

Permalink
Merge pull request #44 from startersclan/fix/daemon-fix-cs2-demo-reco…
Browse files Browse the repository at this point in the history
…rding-causing-daemon-to-crash

Fix (daemon): Fix `DemoRecorder` bot causing daemon to crash
  • Loading branch information
leojonathanoh committed Dec 7, 2023
2 parents df87093 + dbb3381 commit f69ae3f
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions src/scripts/hlstats.pl
Original file line number Diff line number Diff line change
Expand Up @@ -1168,13 +1168,18 @@ sub getPlayerInfo
# For cs2 - Give the bot userid < 0, so it registers as a HLstats_Player
# E.g. L 11/15/2023 - 03:22:54.003 - "SourceTV<0><BOT><>" connected, address "none"
# E.g. L 12/06/2023 - 07:34:16.564 - "Romanov<0><BOT><>" entered the game
# E.g. L 12/06/2023 - 11:03:48.261 - "DemoRecorder<0><BOT><>" connected, address "none"
# E.g. L 12/06/2023 - 11:03:48.261 - "DemoRecorder<0><UNKNOWN><>" entered the game
if ($uniqueid eq "BOT" && index($name, "GOTV") != -1) {
$team = 'TV';
}elsif ($uniqueid eq "BOT" && index($name, "SourceTV") != -1) {
$userid = -1;
$team = 'TV';
}elsif ($uniqueid eq "BOT" && $userid eq '0') {
$userid = -1;
}elsif ($uniqueid eq "BOT" && $userid == 0) {
$userid = -2;
}elsif ($uniqueid eq "UNKNOWN" && $userid == 0) {
$uniqueid = 'BOT';
$userid = -3;
}
}
}
Expand Down

0 comments on commit f69ae3f

Please sign in to comment.