From 5351680138074e9ef09cacf86dd5c9acb64248c3 Mon Sep 17 00:00:00 2001 From: Pedro Ivo Hudson Date: Tue, 13 Feb 2024 19:14:15 -0300 Subject: [PATCH] more games --- protocols/fivem.js | 1 + protocols/quake2.js | 1 + 2 files changed, 2 insertions(+) diff --git a/protocols/fivem.js b/protocols/fivem.js index a74177a..377c041 100644 --- a/protocols/fivem.js +++ b/protocols/fivem.js @@ -17,6 +17,7 @@ export default class fivem extends quake2 { responseType: 'json' }) state.raw.info = json + if ('version' in state.raw.info) state.version = state.raw.info.version } { diff --git a/protocols/quake2.js b/protocols/quake2.js index 8d56b87..3de861d 100644 --- a/protocols/quake2.js +++ b/protocols/quake2.js @@ -83,6 +83,7 @@ export default class quake2 extends Core { if ('sv_hostname' in state.raw) state.name = state.raw.sv_hostname if ('hostname' in state.raw) state.name = state.raw.hostname if ('clients' in state.raw) state.numplayers = state.raw.clients + if ('iv' in state.raw) state.version = state.raw.iv else state.numplayers = state.players.length + state.bots.length } }