Merge pull request #18300 from JJRcop/localhost_is_always_admin

Localhost and .dmbs opened with dreamseeker always get admin
This commit is contained in:
oranges
2016-06-07 22:43:11 +12:00
+7 -1
View File
@@ -113,6 +113,12 @@ var/next_external_rsc = 0
directory[ckey] = src
//Admin Authorisation
var/localhost_addresses = list("127.0.0.1", "::1")
if(!address || (address in localhost_addresses))
var/datum/admin_rank/localhost_rank = new("!localhost!", 65535)
if(localhost_rank)
var/datum/admins/localhost_holder = new(localhost_rank, ckey)
localhost_holder.associate(src)
if(protected_config.autoadmin)
if(!admin_datums[ckey])
var/datum/admin_rank/autorank
@@ -127,7 +133,7 @@ var/next_external_rsc = 0
admin_datums[ckey] = D
holder = admin_datums[ckey]
if(holder)
admins += src
admins |= src
holder.owner = src
//preferences datum - also holds some persistant data for the client (because we may as well keep these datums to a minimum)