Gives admins more tools to find what causes lag, ported from TG

This commit is contained in:
Repede
2018-03-18 00:52:25 -04:00
parent 2ee7d1ca4f
commit ba3b7070d8
2 changed files with 10 additions and 0 deletions

View File

@@ -67,6 +67,9 @@ var/list/admin_ranks = list() //list of all ranks with associated rights
if(config.admin_legacy_system)
load_admin_ranks()
//Clear profile access
for(var/A in world.GetConfig("admin"))
world.SetConfig("APP/admin", A, null)
//load text from file
var/list/Lines = file2list("config/admins.txt")
@@ -95,6 +98,9 @@ var/list/admin_ranks = list() //list of all ranks with associated rights
//create the admin datum and store it for later use
var/datum/admins/D = new /datum/admins(rank, rights, ckey)
if(D.rights & R_DEBUG) //grant profile access
world.SetConfig("APP/admin", ckey, "role=admin")
//find the client for a ckey if they are connected and associate them with the new admin datum
D.associate(directory[ckey])
@@ -120,6 +126,9 @@ var/list/admin_ranks = list() //list of all ranks with associated rights
if(istext(rights)) rights = text2num(rights)
var/datum/admins/D = new /datum/admins(rank, rights, ckey)
if(D.rights & R_DEBUG) //grant profile access
world.SetConfig("APP/admin", ckey, "role=admin")
//find the client for a ckey if they are connected and associate them with the new admin datum
D.associate(directory[ckey])
if(!admin_datums)

View File

@@ -398,6 +398,7 @@ var/list/admin_verbs_event_manager = list(
/client/proc/add_admin_verbs()
if(holder)
control_freak = CONTROL_FREAK_SKIN | CONTROL_FREAK_MACROS
verbs += admin_verbs_default
if(holder.rights & R_BUILDMODE) verbs += /client/proc/togglebuildmodeself
if(holder.rights & R_ADMIN) verbs += admin_verbs_admin