mirror of
https://github.com/tribufu/node-gamedig
synced 2026-05-06 07:07:33 +00:00
fix: Use cp tag for accurate rust player count (#663)
* Use cp tag for accurate rust playercount * Add changelog entry
This commit is contained in:
parent
d834c8091d
commit
0ad23aa1a4
2 changed files with 7 additions and 0 deletions
|
|
@ -1,6 +1,7 @@
|
|||
|
||||
## To Be Released...
|
||||
## 5.X.Y
|
||||
* Fix: Use `cp` tag to get player count on Rust (By @xCausxn #663)
|
||||
|
||||
## 5.1.4
|
||||
* Feat: Replaced `punycode` package usage with `url.domainToASCII` (#630).
|
||||
|
|
|
|||
|
|
@ -141,6 +141,12 @@ export default class valve extends Core {
|
|||
state.maxplayers = value
|
||||
}
|
||||
}
|
||||
if (tag.startsWith('cp')) {
|
||||
const value = parseInt(tag.replace('cp', ''))
|
||||
if (!isNaN(value)) {
|
||||
state.numplayers = value
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue