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
+8
View File
@@ -34,3 +34,11 @@
if(client)
handle_privacy_poll()
client.playtitlemusic()
if(config.player_overflow_cap && config.overflow_server_url) //Overflow rerouting, if set, forces players to be moved to a different server once a player cap is reached. Less rough than a pure kick.
if(src.client.holder) return //admins are immune to overflow rerouting
var/tally = 0
for(var/client/C in clients)
tally++
if(tally > config.player_overflow_cap)
src << link(config.overflow_server_url)