Merge pull request #10975 from AffectedArc07/autoadmin

Auto admin for localhost
This commit is contained in:
variableundefined
2019-03-09 21:32:43 +08:00
committed by GitHub
3 changed files with 14 additions and 1 deletions
+5
View File
@@ -310,6 +310,11 @@
GLOB.directory[ckey] = src
//Admin Authorisation
// Automatically makes localhost connection an admin
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