mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-07-11 23:23:28 +01:00
I think this is instance communication
This commit is contained in:
@@ -1,20 +0,0 @@
|
||||
/// Config holder for stuff relating to multi-server instances
|
||||
/datum/configuration_section/instancing_configuration
|
||||
/// ID of this specific server
|
||||
var/server_id = "paradise_main"
|
||||
/// List of all peer servers
|
||||
var/list/datum/peer_server/peers = list()
|
||||
|
||||
/datum/configuration_section/instancing_configuration/load_data(list/data)
|
||||
// Use the load wrappers here. That way the default isnt made 'null' if you comment out the config line
|
||||
CONFIG_LOAD_STR(server_id, data["server_id"])
|
||||
|
||||
if(islist(data["peer_servers"]))
|
||||
for(var/list/server in data["peer_servers"])
|
||||
if(server["server_port"] == world.port) // Skip our own instance
|
||||
continue
|
||||
var/datum/peer_server/PS = new()
|
||||
PS.internal_ip = server["internal_ip"]
|
||||
PS.server_port = server["server_port"]
|
||||
PS.commskey = server["commskey"]
|
||||
peers.Add(PS)
|
||||
@@ -16,6 +16,10 @@
|
||||
var/_2fa_auth_host = null
|
||||
/// List of IP addresses which bypass world topic rate limiting
|
||||
var/list/topic_ip_ratelimit_bypass = list()
|
||||
/// Server instance ID
|
||||
var/instance_id = "paradise_main"
|
||||
/// Server internal IP
|
||||
var/internal_ip = "127.0.0.1"
|
||||
|
||||
/datum/configuration_section/system_configuration/load_data(list/data)
|
||||
// Use the load wrappers here. That way the default isnt made 'null' if you comment out the config line
|
||||
@@ -28,3 +32,6 @@
|
||||
CONFIG_LOAD_STR(_2fa_auth_host, data["_2fa_auth_host"])
|
||||
|
||||
CONFIG_LOAD_LIST(topic_ip_ratelimit_bypass, data["topic_ip_ratelimit_bypass"])
|
||||
|
||||
CONFIG_LOAD_STR(instance_id, data["instance_id"])
|
||||
CONFIG_LOAD_STR(internal_ip, data["internal_ip"])
|
||||
|
||||
Reference in New Issue
Block a user