mirror of
https://github.com/tribufu/node-gamedig
synced 2026-06-01 09:42:41 +00:00
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:
parent
a62f623134
commit
56a90eabce
3 changed files with 14 additions and 14 deletions
|
|
@ -7,6 +7,7 @@
|
||||||
* Feat: Exfil (2024) - Added support (#661)
|
* Feat: Exfil (2024) - Added support (#661)
|
||||||
* Docs: Valheim numplayers being always 0 on crossplay servers (#668)
|
* Docs: Valheim numplayers being always 0 on crossplay servers (#668)
|
||||||
* Fix: Palworld not respecting query output schema (#666)
|
* 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
|
## 5.1.4
|
||||||
* Feat: Replaced `punycode` package usage with `url.domainToASCII` (#630).
|
* Feat: Replaced `punycode` package usage with `url.domainToASCII` (#630).
|
||||||
|
|
|
||||||
|
|
@ -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
|
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)
|
### <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.
|
The server must have `xmlrpc` enabled, the port needs to be the `xmlrpc` one, not the connection port.
|
||||||
You must have a user account on the server with access level User or higher.
|
You must also pass the info of a user account on the server with the access level of **User** or higher
|
||||||
Pass the login into to GameDig with the additional options: login, password
|
in the options parameters as `login` and `password`.
|
||||||
|
|
||||||
### <a name="gta5r"></a> Grand Theft Auto V - RAGE MP
|
### <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
|
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
|
||||||
|
|
|
||||||
|
|
@ -9,20 +9,19 @@ export default class nadeo extends Core {
|
||||||
await this.query(client, 'Authenticate', this.options.login, this.options.password)
|
await this.query(client, 'Authenticate', this.options.login, this.options.password)
|
||||||
this.registerRtt(Date.now() - start)
|
this.registerRtt(Date.now() - start)
|
||||||
|
|
||||||
// const data = this.methodCall(client, 'GetStatus');
|
|
||||||
|
|
||||||
{
|
{
|
||||||
const results = await this.query(client, 'GetServerOptions')
|
const results = await this.query(client, 'GetServerOptions')
|
||||||
state.name = this.stripColors(results.Name)
|
state.name = this.stripColors(results.Name)
|
||||||
state.password = (results.Password !== 'No password')
|
state.password = (results.Password !== 'No password')
|
||||||
state.maxplayers = results.CurrentMaxPlayers
|
state.maxplayers = results.CurrentMaxPlayers
|
||||||
state.raw.maxspectators = results.CurrentMaxSpectators
|
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.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'
|
if (igm === 5) gamemode = 'Cup'
|
||||||
state.raw.gametype = gamemode
|
state.raw.gametype = gamemode
|
||||||
state.raw.mapcount = results.NbChallenge
|
state.raw.mapcount = results.NbChallenge
|
||||||
|
state.raw.GetCurrentGameInfo = results
|
||||||
}
|
}
|
||||||
|
|
||||||
{
|
{
|
||||||
const results = await this.query(client, 'GetNextMapInfo')
|
const results = await this.query(client, 'GetVersion')
|
||||||
state.raw.nextmapName = this.stripColors(results.Name)
|
state.version = results.Version
|
||||||
state.raw.nextmapUid = results.UId
|
state.raw.GetVersion = results
|
||||||
}
|
}
|
||||||
|
|
||||||
if (this.options.port === 5000) {
|
if (this.options.port === 5000) {
|
||||||
|
|
@ -71,11 +71,10 @@ export default class nadeo extends Core {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
async query (client, ...cmdset) {
|
async query (client, command, ...args) {
|
||||||
const cmd = cmdset[0]
|
const params = args.slice()
|
||||||
const params = cmdset.slice(1)
|
|
||||||
|
|
||||||
const sentPromise = client.query(cmd, params)
|
const sentPromise = client.query(command, params)
|
||||||
const timeoutPromise = Promises.createTimeout(this.options.socketTimeout, 'GBX Method Call')
|
const timeoutPromise = Promises.createTimeout(this.options.socketTimeout, 'GBX Method Call')
|
||||||
return await Promise.race([sentPromise, timeoutPromise, this.abortedPromise])
|
return await Promise.race([sentPromise, timeoutPromise, this.abortedPromise])
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue