mirror of
https://github.com/tribufu/node-gamedig
synced 2026-05-06 15:17:36 +00:00
feat: quake2 protocol's version field, look for 'version' in the raw object
Observed while looking on #619
This commit is contained in:
parent
2cfb2c8592
commit
cb73ccd260
2 changed files with 2 additions and 0 deletions
|
|
@ -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 ('version' in state.raw) state.version = state.raw.version
|
||||
if ('iv' in state.raw) state.version = state.raw.iv
|
||||
else state.numplayers = state.players.length + state.bots.length
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue