forked from OpenWF/SpaceNinjaServer
chore: add consistent options for IRC, HUB, & NRS addresses (#2746)
Reviewed-on: OpenWF/SpaceNinjaServer#2746 Co-authored-by: Sainan <63328889+Sainan@users.noreply.github.com> Co-committed-by: Sainan <63328889+Sainan@users.noreply.github.com>
This commit is contained in:
parent
18556cb2f5
commit
f4f7ed00d1
@ -14,7 +14,7 @@ SpaceNinjaServer requires a `config.json`. To set it up, you can copy the [confi
|
|||||||
|
|
||||||
- `skipTutorial` affects only newly created accounts, so you may wish to change it before logging in for the first time.
|
- `skipTutorial` affects only newly created accounts, so you may wish to change it before logging in for the first time.
|
||||||
- `logger.level` can be `fatal`, `error`, `warn`, `info`, `http`, `debug`, or `trace`.
|
- `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.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.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.
|
- `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 type { RequestHandler } from "express";
|
||||||
import { getReflexiveAddress } from "../../services/configService.ts";
|
import { config, getReflexiveAddress } from "../../services/configService.ts";
|
||||||
|
|
||||||
export const hubController: RequestHandler = (req, res) => {
|
export const hubController: RequestHandler = (req, res) => {
|
||||||
const { myAddress } = getReflexiveAddress(req);
|
res.json(`hub ${config.hubAddress ?? getReflexiveAddress(req).myAddress}:6952`);
|
||||||
res.json(`hub ${myAddress}:6952`);
|
|
||||||
};
|
};
|
||||||
|
|||||||
@ -95,11 +95,11 @@ const createLoginResponse = (
|
|||||||
BuildLabel: buildLabel
|
BuildLabel: buildLabel
|
||||||
};
|
};
|
||||||
if (version_compare(buildLabel, "2015.02.13.10.41") >= 0) {
|
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) {
|
if (version_compare(buildLabel, "2015.05.14.16.29") >= 0) {
|
||||||
// U17 and up
|
// U17 and up
|
||||||
resp.IRC = config.myIrcAddresses ?? [myAddress];
|
resp.IRC = [config.ircAddress ?? myAddress];
|
||||||
}
|
}
|
||||||
if (version_compare(buildLabel, "2018.11.08.14.45") >= 0) {
|
if (version_compare(buildLabel, "2018.11.08.14.45") >= 0) {
|
||||||
// U24 and up
|
// U24 and up
|
||||||
|
|||||||
@ -14,7 +14,9 @@ export interface IConfig {
|
|||||||
myAddress: string;
|
myAddress: string;
|
||||||
httpPort?: number;
|
httpPort?: number;
|
||||||
httpsPort?: number;
|
httpsPort?: number;
|
||||||
myIrcAddresses?: string[];
|
ircAddress?: string;
|
||||||
|
hubAddress?: string;
|
||||||
|
nrsAddress?: string;
|
||||||
administratorNames?: string[];
|
administratorNames?: string[];
|
||||||
autoCreateAccount?: boolean;
|
autoCreateAccount?: boolean;
|
||||||
skipTutorial?: boolean;
|
skipTutorial?: boolean;
|
||||||
@ -84,6 +86,7 @@ export interface IConfig {
|
|||||||
|
|
||||||
export const configRemovedOptionsKeys = [
|
export const configRemovedOptionsKeys = [
|
||||||
"NRS",
|
"NRS",
|
||||||
|
"myIrcAddresses",
|
||||||
"skipAllDialogue",
|
"skipAllDialogue",
|
||||||
"infiniteCredits",
|
"infiniteCredits",
|
||||||
"infinitePlatinum",
|
"infinitePlatinum",
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user