mirror of
https://github.com/tribufu/node-gamedig
synced 2026-06-01 09:42:41 +00:00
fix: xonotic player names being reported as numbers (#580)
* fix: xonotic player names being reported as numbers * changelog
This commit is contained in:
parent
cfd5614353
commit
5210f523b4
4 changed files with 20 additions and 2 deletions
|
|
@ -6,6 +6,7 @@
|
||||||
* Restore Minecraft's favicon (#575)
|
* Restore Minecraft's favicon (#575)
|
||||||
* Grand Theft Auto V: Rage MP - Added support (By @xCausxn #576)
|
* Grand Theft Auto V: Rage MP - Added support (By @xCausxn #576)
|
||||||
* Fix duplicate game entry for The Forest (2014), add old id for backwards compatibility (By @xCausxn #579)
|
* Fix duplicate game entry for The Forest (2014), add old id for backwards compatibility (By @xCausxn #579)
|
||||||
|
* Fix Xonotic player's names being numbers and their names being in the "raw" field (#580)
|
||||||
|
|
||||||
## 5.0.0
|
## 5.0.0
|
||||||
* Added a new stabilized field `version` in the query response (By @podrivo #532)
|
* Added a new stabilized field `version` in the query response (By @podrivo #532)
|
||||||
|
|
|
||||||
|
|
@ -3261,7 +3261,7 @@ export const games = {
|
||||||
release_year: 2011,
|
release_year: 2011,
|
||||||
options: {
|
options: {
|
||||||
port: 26000,
|
port: 26000,
|
||||||
protocol: 'quake3'
|
protocol: 'xonotic'
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
xpandrally: {
|
xpandrally: {
|
||||||
|
|
|
||||||
|
|
@ -58,11 +58,12 @@ import beammp from './beammp.js'
|
||||||
import dayz from './dayz.js'
|
import dayz from './dayz.js'
|
||||||
import theisleevrima from './theisleevrima.js'
|
import theisleevrima from './theisleevrima.js'
|
||||||
import ragemp from './ragemp.js'
|
import ragemp from './ragemp.js'
|
||||||
|
import xonotic from './xonotic.js'
|
||||||
|
|
||||||
export {
|
export {
|
||||||
armagetron, ase, asa, assettocorsa, battlefield, buildandshoot, cs2d, discord, doom3, eco, epic, factorio, farmingsimulator, ffow,
|
armagetron, ase, asa, assettocorsa, battlefield, buildandshoot, cs2d, discord, doom3, eco, epic, factorio, farmingsimulator, ffow,
|
||||||
fivem, gamespy1, gamespy2, gamespy3, geneshift, goldsrc, gtasao, hexen2, jc2mp, kspdmp, mafia2mp, mafia2online, minecraft,
|
fivem, gamespy1, gamespy2, gamespy3, geneshift, goldsrc, gtasao, hexen2, jc2mp, kspdmp, mafia2mp, mafia2online, minecraft,
|
||||||
minecraftbedrock, minecraftvanilla, minetest, mumble, mumbleping, nadeo, openttd, palworld, quake1, quake2, quake3, rfactor, ragemp, samp,
|
minecraftbedrock, minecraftvanilla, minetest, mumble, mumbleping, nadeo, openttd, palworld, quake1, quake2, quake3, rfactor, ragemp, samp,
|
||||||
savage2, starmade, starsiege, teamspeak2, teamspeak3, terraria, tribes1, tribes1master, unreal2, ut3, valve,
|
savage2, starmade, starsiege, teamspeak2, teamspeak3, terraria, tribes1, tribes1master, unreal2, ut3, valve,
|
||||||
vcmp, ventrilo, warsow, eldewrito, beammpmaster, beammp, dayz, theisleevrima
|
vcmp, ventrilo, warsow, eldewrito, beammpmaster, beammp, dayz, theisleevrima, xonotic
|
||||||
}
|
}
|
||||||
|
|
|
||||||
16
protocols/xonotic.js
Normal file
16
protocols/xonotic.js
Normal file
|
|
@ -0,0 +1,16 @@
|
||||||
|
import quake3 from './quake3.js'
|
||||||
|
|
||||||
|
export default class xonotic extends quake3 {
|
||||||
|
async run (state) {
|
||||||
|
await super.run(state)
|
||||||
|
|
||||||
|
// Sometimes, the server returns a player's name as a number (which seems to be the team?) and the name in
|
||||||
|
// an extra field called "address", we are not sure of this behaviour nor if this is a good enough solution
|
||||||
|
for (const player of state.players) {
|
||||||
|
if (!isNaN(player.name) && player.raw.address) {
|
||||||
|
player.raw.team = player.name
|
||||||
|
player.name = player.raw.address
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
Loading…
Add table
Add a link
Reference in a new issue