feat: add requestPlayers option (#624)

* feat: add  option

* docs: alter readme
This commit is contained in:
CosminPerRam 2024-09-01 16:13:03 +03:00 committed by GitHub
parent 0fe87c52eb
commit e74ae933b3
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 11 additions and 3 deletions

View file

@ -163,6 +163,10 @@ export default class valve extends Core {
async queryPlayers (/** Results */ state) {
state.raw.players = []
if (!this.options.requestPlayers) {
return
}
this.logger.debug('Requesting player list ...')
const b = await this.sendPacket(
this.goldsrcInfo ? undefined : 0x55,