Config option for the paranoid

This commit is contained in:
AffectedArc07
2019-03-03 11:37:49 +00:00
parent d1a161cf8f
commit 6ab0344bb6
3 changed files with 13 additions and 4 deletions
+5
View File
@@ -213,6 +213,9 @@
// Developer
var/developer_express_start = 0
// Automatic localhost admin disable
var/disable_localhost_admin = 0
/datum/configuration/New()
for(var/T in subtypesof(/datum/game_mode))
var/datum/game_mode/M = T
@@ -645,6 +648,8 @@
config.disable_high_pop_mc_mode_amount = text2num(value)
if("developer_express_start")
config.developer_express_start = 1
if("disable_localhost_admin")
config.disable_localhost_admin = 1
else
log_config("Unknown setting in configuration: '[name]'")
+4 -3
View File
@@ -311,9 +311,10 @@
//Admin Authorisation
// Automatically makes localhost connection an admin
var/localhost_addresses = list("127.0.0.1", "::1") // Adresses
if(!isnull(address) && address in localhost_addresses)
new /datum/admins("!LOCALHOST!", R_HOST, ckey) // Makes localhost rank
if(!config.disable_localhost_admin)
var/localhost_addresses = list("127.0.0.1", "::1") // Adresses
if(!isnull(address) && address in localhost_addresses)
new /datum/admins("!LOCALHOST!", R_HOST, ckey) // Makes localhost rank
holder = admin_datums[ckey]
if(holder)
GLOB.admins += src
+4 -1
View File
@@ -393,4 +393,7 @@ HIGH_POP_MC_MODE_AMOUNT 65
DISABLE_HIGH_POP_MC_MODE_AMOUNT 60
##Uncomment to enable developer start. Auto starts the server after initialization
##DEVELOPER_EXPRESS_START
##DEVELOPER_EXPRESS_START
## Uncomment to disable automatic admin for localhost
#DISABLE_LOCALHOST_ADMIN