mirror of
https://github.com/clusterio/clusterio.git
synced 2026-11-15 07:24:52 +09:00
Rename Slave to Host
The role of a slave as a host for Factorio servers is not well reflected in its name and has caused confusion among users. Rename slave to host to better reflect its role as a host of Factorio servers.
This commit is contained in:
1 parent
70ad295a89
commit
6fc3abafd5
101 files changed
+1168
-1168
No files matched your search
@@ -12,7 +12,7 @@ Run the following commands in the folder Clusterio is installed to:
|
||||
npm install @clusterio/plugin-player_auth
|
||||
npx clusteriocontroller plugin add @clusterio/plugin-player_auth
|
||||
|
||||
Substitute clusteriocontroller with clusterioslave or clusterioctl if this a dedicate slave or ctl installation respectively.
|
||||
Substitute clusteriocontroller with clusteriohost or clusterioctl if this a dedicate host or ctl installation respectively.
|
||||
|
||||
|
||||
## Controller Configuration
|
||||
|
||||
@@ -3,7 +3,7 @@ let { libConfig, libLink } = require("@clusterio/lib");
|
||||
|
||||
|
||||
class ControllerConfigGroup extends libConfig.PluginConfigGroup {}
|
||||
ControllerConfigGroup.defaultAccess = ["controller", "slave", "control"];
|
||||
ControllerConfigGroup.defaultAccess = ["controller", "host", "control"];
|
||||
ControllerConfigGroup.groupName = "player_auth";
|
||||
ControllerConfigGroup.define({
|
||||
name: "code_length",
|
||||
@@ -33,7 +33,7 @@ module.exports = {
|
||||
messages: {
|
||||
fetchPlayerCode: new libLink.Request({
|
||||
type: "player_auth:fetch_player_code",
|
||||
links: ["instance-slave", "slave-controller"],
|
||||
links: ["instance-host", "host-controller"],
|
||||
forwardTo: "controller",
|
||||
requestProperties: {
|
||||
"player": { type: "string" },
|
||||
@@ -45,7 +45,7 @@ module.exports = {
|
||||
}),
|
||||
setVerifyCode: new libLink.Request({
|
||||
type: "player_auth:set_verify_code",
|
||||
links: ["instance-slave", "slave-controller"],
|
||||
links: ["instance-host", "host-controller"],
|
||||
forwardTo: "controller",
|
||||
requestProperties: {
|
||||
"player": { type: "string" },
|
||||
|
||||
@@ -18,7 +18,7 @@ class InstancePlugin extends libPlugin.BaseInstancePlugin {
|
||||
|
||||
async handleEvent(event) {
|
||||
if (event.type === "open_dialog") {
|
||||
if (!this.slave.connector.connected) {
|
||||
if (!this.host.connector.connected) {
|
||||
await this.sendRcon(`/web-login error ${event.player} login is temporarily unavailable`);
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -363,10 +363,10 @@ describe("player_auth", function() {
|
||||
describe("open_dialog", async function() {
|
||||
it("should call /web-login error if not connected to controller", async function() {
|
||||
instancePlugin.instance.server.reset();
|
||||
instancePlugin.slave.connector.connected = false;
|
||||
instancePlugin.host.connector.connected = false;
|
||||
await instancePlugin.handleEvent({ type: "open_dialog", player: "test" });
|
||||
let command = instancePlugin.instance.server.rconCommands[0];
|
||||
instancePlugin.slave.connector.connected = true;
|
||||
instancePlugin.host.connector.connected = true;
|
||||
assert.equal(command, "/web-login error test login is temporarily unavailable");
|
||||
});
|
||||
it("should call /web-login error after error from the controller", async function() {
|
||||
|
||||
Reference in new issue
Block a user