返回提交历史
Modified
README.md
+1
-1
Modified
src/controllers/api/loginController.ts
+3
-3
XFEstudio/XFESpaceNinjaServer
chore: support %THIS_MACHINE% for ircAddress and nrsAddress (#3358)
Reviewed-on: https://onlyg.it/OpenWF/SpaceNinjaServer/pulls/3358 Co-authored-by: Sainan <63328889+Sainan@users.noreply.github.com> Co-committed-by: Sainan <63328889+Sainan@users.noreply.github.com>
ae84453c
代码差异
2 个文件
+4
-4
@@ -16,7 +16,7 @@ SpaceNinjaServer requires a `config.json`. To set it up, you can copy the [confi
16
16
- `logger.level` can be `fatal`, `error`, `warn`, `info`, `http`, `debug`, or `trace`.
17
17
- `bindAddress`, `httpPort`, `httpsPort` are related to how SpaceNinjaServer is reached on the network. Under Docker, these options are unchangable; modify your `docker-compose.yml`, instead.
18
18
- `ircExecutable` and `hubExecutable` can be provided with relative paths to executables which will be ran as child processes of SpaceNinjaServer.
19
- `ircAddress`, `hubAddress`, and `nrsAddress` can be provided if these secondary servers are on a different machine. If not provided, the web server address is used. Note that these addresses are for the clients to resolve, not the server.
19
- `ircAddress`, `hubServers`, and `nrsAddress` configure how clients contact these secondary servers. For `ircAddress` and `nrsAddress`, a null value is equivalent to `%THIS_MACHINE%`, which should just work when SpaceNinjaServer and the secondary servers are on the same machine.
20
20
- `worldState.eidolonOverride` can be set to `day` or `night` to lock the time to day/fass and night/vome on Plains of Eidolon/Cambion Drift.
21
21
- `worldState.vallisOverride` can be set to `warm` or `cold` to lock the temperature on Orb Vallis.
22
22
- `worldState.duviriOverride` can be set to `joy`, `anger`, `envy`, `sorrow`, or `fear` to lock the Duviri spiral.
@@ -160,10 +160,10 @@ const createLoginResponse = (request: Request, account: IDatabaseAccountJson, bu
160
160
resp.SteamId = "0";
161
161
}
162
162
if (version_compare(buildLabel, gameToBuildVersion["15.14.1"]) >= 0) {
163
resp.NRS = [config.nrsAddress ?? myAddress];
163
resp.NRS = [(config.nrsAddress ?? "%THIS_MACHINE%").split("%THIS_MACHINE%").join(myAddress)];
164
164
}
165
165
if (version_compare(buildLabel, gameToBuildVersion["16.5.5"]) >= 0) {
166
resp.IRC = [config.ircAddress ?? myAddress];
166
resp.IRC = [(config.ircAddress ?? "%THIS_MACHINE%").split("%THIS_MACHINE%").join(myAddress)];
167
167
}
168
168
if (version_compare(buildLabel, gameToBuildVersion["24.0.0"]) >= 0) {
169
169
resp.ConsentNeeded = account.ConsentNeeded;
@@ -216,7 +216,7 @@ const createLoginResponse = (request: Request, account: IDatabaseAccountJson, bu
216
216
) {
217
217
const tunables = getTunablesForClient((request.socket.address() as AddressInfo).address, myAddress);
218
218
if (version_compare(buildLabel, gameToBuildVersion["16.5.5"]) < 0) {
219
tunables.irc = config.ircAddress ?? myAddress;
219
tunables.irc = (config.ircAddress ?? "%THIS_MACHINE%").split("%THIS_MACHINE%").join(myAddress);
220
220
}
221
221
raw += "\t" + JSON.stringify(tunables);
222
222
}