XFE Git
XFE Studio Git
Git 首页 全局搜索
XFE 主站 文档 NuGet

SpaceNinjaServer

A simple server for a small space ninja game

公开
关注 0 Fork 1 Star 0
返回提交历史

XFEstudio/SpaceNinjaServer

chore: don't provide an empty NRS array to pre-U29 clients (#3808)

Reviewed-on: https://onlyg.it/OpenWF/SpaceNinjaServer/pulls/3808 Co-authored-by: Sainan <63328889+Sainan@users.noreply.github.com> Co-committed-by: Sainan <63328889+Sainan@users.noreply.github.com>

ca7c1e6a
Sainan <63328889+Sainan@users.noreply.github.com>
提交于

代码差异

1 个文件 +4 -0
Modified src/controllers/api/loginController.ts +4 -0
@@ -194,6 +194,10 @@ const createLoginResponse = (request: Request, account: IDatabaseAccountJson, bu
194 194 }
195 195 if (version_compare(buildLabel, gameToBuildVersion["15.14.1"]) >= 0) {
196 196 resp.NRS = (config.nrsAddresses ?? []).map(x => x.split("%THIS_MACHINE%").join(myAddress));
197 // U16 ~ U28 are known to show an "Internal error." popup with an empty array.
198 if (resp.NRS.length == 0 && version_compare(buildLabel, gameToBuildVersion["29.0.0"]) < 0) {
199 resp.NRS.push(myAddress);
200 }
197 201 }
198 202 if (version_compare(buildLabel, gameToBuildVersion["16.5.5"]) >= 0) {
199 203 resp.IRC = [(config.ircAddress || "%THIS_MACHINE%").split("%THIS_MACHINE%").join(myAddress)];