chore: add consistent options for IRC, HUB, & NRS addresses
All checks were successful
Build / build (pull_request) Successful in 1m13s
All checks were successful
Build / build (pull_request) Successful in 1m13s
This commit is contained in:
parent
4d8dbd99aa
commit
831403bf17
@ -13,7 +13,7 @@ To get an idea of what functionality you can expect to be missing [have a look t
|
||||
SpaceNinjaServer requires a `config.json`. To set it up, you can copy the [config-vanilla.json](config-vanilla.json), which has most cheats disabled.
|
||||
|
||||
- `logger.level` can be `fatal`, `error`, `warn`, `info`, `http`, `debug`, or `trace`.
|
||||
- `myIrcAddresses` can be used to point to an IRC server. If not provided, defaults to `[ myAddress ]`.
|
||||
- `ircAddress`, `hubAddress`, and `nrsAddress` are not present by default but can be provided if these secondary servers are on a different machine.
|
||||
- `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.
|
||||
- `worldState.vallisOverride` can be set to `warm` or `cold` to lock the temperature on Orb Vallis.
|
||||
- `worldState.duviriOverride` can be set to `joy`, `anger`, `envy`, `sorrow`, or `fear` to lock the Duviri spiral.
|
||||
|
||||
@ -1,7 +1,6 @@
|
||||
import type { RequestHandler } from "express";
|
||||
import { getReflexiveAddress } from "../../services/configService.ts";
|
||||
import { config, getReflexiveAddress } from "../../services/configService.ts";
|
||||
|
||||
export const hubController: RequestHandler = (req, res) => {
|
||||
const { myAddress } = getReflexiveAddress(req);
|
||||
res.json(`hub ${myAddress}:6952`);
|
||||
res.json(`hub ${config.hubAddress ?? getReflexiveAddress(req).myAddress}:6952`);
|
||||
};
|
||||
|
||||
@ -95,11 +95,11 @@ const createLoginResponse = (
|
||||
BuildLabel: buildLabel
|
||||
};
|
||||
if (version_compare(buildLabel, "2015.02.13.10.41") >= 0) {
|
||||
resp.NRS = [myAddress];
|
||||
resp.NRS = [config.nrsAddress ?? myAddress];
|
||||
}
|
||||
if (version_compare(buildLabel, "2015.05.14.16.29") >= 0) {
|
||||
// U17 and up
|
||||
resp.IRC = config.myIrcAddresses ?? [myAddress];
|
||||
resp.IRC = [config.ircAddress ?? myAddress];
|
||||
}
|
||||
if (version_compare(buildLabel, "2018.11.08.14.45") >= 0) {
|
||||
// U24 and up
|
||||
|
||||
@ -14,7 +14,9 @@ export interface IConfig {
|
||||
myAddress: string;
|
||||
httpPort?: number;
|
||||
httpsPort?: number;
|
||||
myIrcAddresses?: string[];
|
||||
ircAddress?: string;
|
||||
hubAddress?: string;
|
||||
nrsAddress?: string;
|
||||
administratorNames?: string[];
|
||||
autoCreateAccount?: boolean;
|
||||
skipTutorial?: boolean;
|
||||
@ -84,6 +86,7 @@ export interface IConfig {
|
||||
|
||||
export const configRemovedOptionsKeys = [
|
||||
"NRS",
|
||||
"myIrcAddresses",
|
||||
"skipAllDialogue",
|
||||
"infiniteCredits",
|
||||
"infinitePlatinum",
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user