mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-07-21 12:04:48 +01:00
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:
@@ -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)
|
||||
Reference in New Issue
Block a user