mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-07-15 01:54:52 +01:00
Adds optional population caps for those that want them. These be dark measures, so tread carefully ye who dare enter this place.
There are three "levels" of popcaps, and you can use them in any assortment you like: The "soft" cap produces a message on join, and takes no action. The "hard" cap disallows joining whilst too many other people are alive and playing in game, but allows observing. The "extreme" cap prevents people from joining the server at all while the cap is exceeded. It won't kick out people who failed to qualify during roundstart, but if they leave they won't be able to get back in. In each case a customizable message config option has been given. Admins are also immune to most population caps (they still are hit by the ones in job shuffling, but can late join as normal afterwards)
This commit is contained in:
@@ -47,6 +47,11 @@ world/IsBanned(key,address,computer_id)
|
||||
message_admins("<span class='adminnotice'>Failed Login: [key] - Guests not allowed</span>")
|
||||
return list("reason"="guest", "desc"="\nReason: Guests not allowed. Please sign in with a byond account.")
|
||||
|
||||
//Population Cap Checking
|
||||
if(config.extreme_popcap && living_player_count() >= config.extreme_popcap && !(ckey(key) in admin_datums))
|
||||
log_access("Failed Login: [key] - Population cap reached")
|
||||
return list("reason"="popcap", "desc"= "\nReason: [config.extreme_popcap_message]")
|
||||
|
||||
if(config.ban_legacy_system)
|
||||
|
||||
//Ban Checking
|
||||
|
||||
Reference in New Issue
Block a user