Closed vikpe closed 1 year ago
i've prepared the qw hub api with endpoints for lastscores/laststats (e.g. https://hubapi.quakeworld.nu/v2/servers/quake.se:28501/lastscores) but it will return empty result as long as the connectionless cmd returns invalid json. once it works I can add lastscores to QW HUB, streambot etc.
I don't have c or mvdsv setup on my laptop and I'm traveling next two weeks.
Should be pretty easy to fix.
Example
Related code https://github.com/QW-Group/mvdsv/blob/971e7de49255fb41d56ae8e9332825bbf15617a8/src/sv_demo_misc.c#L1035-L1107
In the example above
,
is printed as the first entry. Could it be because we are reading the stats file for the demo of current game (which is empty)? Also there is an invalid trailing comma at the second entry.We should iterate a
Sys_listdir()
call with the stats files, instead of using the demo files (sv_demoRegexp
).Example