Auto Local Admin (#11254)

This commit is contained in:
Geeves
2021-02-23 17:19:54 +01:00
committed by GitHub
parent 7ab47aac02
commit b633d1e75a
3 changed files with 19 additions and 0 deletions
+12
View File
@@ -1,3 +1,8 @@
var/list/localhost_addresses = list(
"127.0.0.1" = TRUE,
"::1" = TRUE
)
////////////
//SECURITY//
////////////
@@ -392,6 +397,13 @@
/client/proc/InitClient()
to_chat(src, "<span class='alert'>If the title screen is black, resources are still downloading. Please be patient until the title screen appears.</span>")
var/local_connection = (config.auto_local_admin && !config.use_forumuser_api && (isnull(address) || localhost_addresses[address]))
// Automatic admin rights for people connecting locally.
// Concept stolen from /tg/ with deepest gratitude.
// And ported from Nebula with love.
if(local_connection && !admin_datums[ckey])
new /datum/admins("Local Host", R_ALL, ckey)
//Admin Authorisation
holder = admin_datums[ckey]
if(holder)