From c1d5b6a05ab416aab54a2d136c2155bd73494082 Mon Sep 17 00:00:00 2001 From: legonzaur Date: Fri, 21 Apr 2023 12:11:37 +0200 Subject: [PATCH] restrict deaths_while_equipped for weapons and player routes --- src/client/client.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/client/client.ts b/src/client/client.ts index f7309d1..479183f 100644 --- a/src/client/client.ts +++ b/src/client/client.ts @@ -114,7 +114,7 @@ router.get( if (index === 'attacker_id') data[requestIndex].username = e.attacker_name if (index === 'servername') data[requestIndex].host = e.host - if (index === 'cause_of_death' || (req.query.weapon && !req.query.weapon.toString().startsWith('!'))) + if (index === 'cause_of_death' || (req.query.weapon && !req.query.weapon.toString().startsWith('!') && index === 'attacker_id')) data[requestIndex].deaths_while_equipped = Number(e.deaths_with_weapon) + (data[requestIndex].deaths_while_equipped || 0)