mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-30 03:55:33 +00:00
Gives admins more tools to find what causes lag, ported from TG
This commit is contained in:
@@ -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)
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user