Skip to content

Commit

Permalink
Provide full server response as raw data
Browse files Browse the repository at this point in the history
  • Loading branch information
RattleSN4K3 committed Sep 25, 2024
1 parent 5de902f commit 3ee7e76
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions protocols/renegadex.js
Original file line number Diff line number Diff line change
Expand Up @@ -199,18 +199,18 @@ export default class renegadex extends Core {
populateProperties (state, serverInfo) {
let emptyPrefix = ''
if (serverInfo.NamePrefix) emptyPrefix = serverInfo.NamePrefix + ' '
const servername = `${emptyPrefix}${serverInfo.Name}`
const servername = `${emptyPrefix}${serverInfo.Name || ''}`
const numplayers = serverInfo.Players || 0
const variables = serverInfo.Variables || {}

state.name = servername
state.map = serverInfo['Current Map']
state.password = variables.bPassworded
state.map = serverInfo['Current Map'] || ''
state.password = !!variables.bPassworded

state.numplayers = numplayers
state.maxplayers = variables['Player Limit'] || 0

state.raw = variables
state.version = serverInfo['Game Version']
state.raw = serverInfo
state.version = serverInfo['Game Version'] || ''
}
}

0 comments on commit 3ee7e76

Please sign in to comment.