fix: Nadeo failing queries on map info (#667)

* fix: nadeo failing queries

* docs: update changelog, fix games list issue not being hyperlinked

* feat: Adding CurrentChallengeInfo to get Map Informations (#669)

Co-authored-by: Stephan Schaffner <stephan.schaffner@check24.de>

* docs: remove note removal notice from games_list

* docs: update changelog to note for version

* docs: mention @Hornochs in the changelog line

* chore: swap some lines around

---------

Co-authored-by: Stephan Schaffner <chaos_bloated856@memehorst.de>
Co-authored-by: Stephan Schaffner <stephan.schaffner@check24.de>
This commit is contained in:
CosminPerRam 2025-01-21 19:40:49 +02:00 committed by GitHub
parent a62f623134
commit 56a90eabce
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 14 additions and 14 deletions

View file

@ -7,6 +7,7 @@
* Feat: Exfil (2024) - Added support (#661)
* Docs: Valheim numplayers being always 0 on crossplay servers (#668)
* Fix: Palworld not respecting query output schema (#666)
* Fix: Nadeo failing queries on map info (also added version field) (#667 with @Hornochs)
## 5.1.4
* Feat: Replaced `punycode` package usage with `url.domainToASCII` (#630).

View file

@ -430,9 +430,9 @@ If you do not wish to run the plugin, or do not require details such as channel
you can use the 'mumbleping' server type instead, which uses a less accurate but more reliable solution
### <a name="nadeo"></a> Nadeo (ShootMania / TrackMania / etc)
The server must have xmlrpc enabled, and you must pass the xmlrpc port to GameDig, not the connection port.
You must have a user account on the server with access level User or higher.
Pass the login into to GameDig with the additional options: login, password
The server must have `xmlrpc` enabled, the port needs to be the `xmlrpc` one, not the connection port.
You must also pass the info of a user account on the server with the access level of **User** or higher
in the options parameters as `login` and `password`.
### <a name="gta5r"></a> Grand Theft Auto V - RAGE MP
If you are using a FQDN for your server, you will need to set the host parameter to be this domain e.g. rage2.mydomain.com

View file

@ -9,20 +9,19 @@ export default class nadeo extends Core {
await this.query(client, 'Authenticate', this.options.login, this.options.password)
this.registerRtt(Date.now() - start)
// const data = this.methodCall(client, 'GetStatus');
{
const results = await this.query(client, 'GetServerOptions')
state.name = this.stripColors(results.Name)
state.password = (results.Password !== 'No password')
state.maxplayers = results.CurrentMaxPlayers
state.raw.maxspectators = results.CurrentMaxSpectators
state.raw.GetServerOptions = results
}
{
const results = await this.query(client, 'GetCurrentMapInfo')
const results = await this.query(client, 'GetCurrentChallengeInfo')
state.map = this.stripColors(results.Name)
state.raw.mapUid = results.UId
state.raw.GetCurrentChallengeInfo = results
}
{
@ -37,12 +36,13 @@ export default class nadeo extends Core {
if (igm === 5) gamemode = 'Cup'
state.raw.gametype = gamemode
state.raw.mapcount = results.NbChallenge
state.raw.GetCurrentGameInfo = results
}
{
const results = await this.query(client, 'GetNextMapInfo')
state.raw.nextmapName = this.stripColors(results.Name)
state.raw.nextmapUid = results.UId
const results = await this.query(client, 'GetVersion')
state.version = results.Version
state.raw.GetVersion = results
}
if (this.options.port === 5000) {
@ -71,11 +71,10 @@ export default class nadeo extends Core {
}
}
async query (client, ...cmdset) {
const cmd = cmdset[0]
const params = cmdset.slice(1)
async query (client, command, ...args) {
const params = args.slice()
const sentPromise = client.query(cmd, params)
const sentPromise = client.query(command, params)
const timeoutPromise = Promises.createTimeout(this.options.socketTimeout, 'GBX Method Call')
return await Promise.race([sentPromise, timeoutPromise, this.abortedPromise])
}