Overflow Rerouting System

This commit adds an overflow rerouting system customizable by modifying
the config. If the config values are set, after X amount of clients have
connected, the server will start rerouting all new players to the
configuration "overflow" server. Note that admins are immune to this, and
therefore will not be rerouted under any circumstance. Players that have
already connected and have a body will not be rerouted either, this will
only affect new players that get sent to the lobby.

It probably would also kick players if an admin sent them to the lobby,
but that's a very special case scenario.
This commit is contained in:
Tigercat2000
2015-05-28 07:08:33 -07:00
parent 613ae3f552
commit 1643b0f118
3 changed files with 27 additions and 1 deletions
+9
View File
@@ -81,6 +81,7 @@
var/forumurl = "http://baystation12.net/forums/"
var/media_base_url = "http://nanotrasen.se/media" // http://ss13.nexisonline.net/media
var/overflow_server_url = "byond://nanotrasen.se:6666"
var/forbid_singulo_possession = 0
@@ -154,6 +155,7 @@
var/starlight = 0 // Whether space turfs have ambient light or not
var/allow_holidays = 0
var/player_overflow_cap = 0 //number of players before the server starts rerouting
/datum/configuration/New()
var/list/L = typesof(/datum/game_mode) - /datum/game_mode
@@ -508,6 +510,13 @@
var/vvalue = text2num(value)
config.starlight = vvalue >= 0 ? vvalue : 0
if("player_reroute_cap")
var/vvalue = text2num(value)
config.player_overflow_cap = vvalue >= 0 ? vvalue : 0
if("overflow_server_url")
config.overflow_server_url = value
else
diary << "Unknown setting in configuration: '[name]'"