mirror of
https://github.com/VOREStation/VOREStation.git
synced 2026-07-16 17:44:25 +01:00
[MAJOR CHANGE] Admin rank datum (#17133)
* Admin ranks update * Permissions fix * One missing thing * Further rework to make database also fully work * Adds admin rank bitflag calculator to tools * ZA WARUDO --------- Co-authored-by: C.L. <killer65311@gmail.com>
This commit is contained in:
@@ -7,7 +7,7 @@
|
||||
|
||||
var/list/Lines = list()
|
||||
|
||||
if(check_rights(R_ADMIN|R_SERVER|R_MOD,FALSE,src))
|
||||
if(check_rights_for(src, R_ADMIN|R_SERVER|R_MOD))
|
||||
for(var/client/C in GLOB.clients)
|
||||
var/entry = "<tr><td>[C.key]"
|
||||
if(C.holder && C.holder.fakekey)
|
||||
|
||||
@@ -51,13 +51,13 @@
|
||||
if(holder && !holder.fakekey)
|
||||
ooc_style = "elevated"
|
||||
|
||||
if(holder.rights & R_EVENT) //Retired Admins
|
||||
if(check_rights(R_EVENT)) //Retired Admins
|
||||
ooc_style = "event_manager"
|
||||
if(holder.rights & R_ADMIN && !(holder.rights & R_BAN)) //Game Masters
|
||||
if(check_rights(R_ADMIN) && !(check_rights(R_BAN))) //Game Masters
|
||||
ooc_style = "moderator"
|
||||
if(holder.rights & R_SERVER && !(holder.rights & R_BAN)) //Developers
|
||||
if(check_rights(R_SERVER) && !(check_rights(R_BAN))) //Developers
|
||||
ooc_style = "developer"
|
||||
if(holder.rights & R_ADMIN && holder.rights & R_BAN) //Admins
|
||||
if(check_rights(R_ADMIN) && check_rights(R_BAN)) //Admins
|
||||
ooc_style = "admin"
|
||||
|
||||
msg = GLOB.is_valid_url.Replace(msg,span_linkify("$1"))
|
||||
@@ -74,7 +74,7 @@
|
||||
else
|
||||
display_name = holder.fakekey
|
||||
var/pref_color = prefs.read_preference(/datum/preference/color/ooc_color)
|
||||
if(holder && !holder.fakekey && (holder.rights & R_ADMIN|R_FUN|R_EVENT) && CONFIG_GET(flag/allow_admin_ooccolor) && pref_color != "#010000") // keeping this for the badmins
|
||||
if(holder && !holder.fakekey && (check_rights(R_ADMIN|R_FUN|R_EVENT)) && CONFIG_GET(flag/allow_admin_ooccolor) && pref_color != "#010000") // keeping this for the badmins
|
||||
to_chat(target, span_ooc("<font color='[pref_color]'>" + create_text_tag("ooc", "OOC:", target) + " <EM>[display_name]:</EM> [span_message(msg)]</font>"))
|
||||
else
|
||||
to_chat(target, span_ooc("<span class='[ooc_style]'>" + create_text_tag("ooc", "OOC:", target) + " <EM>[display_name]:</EM> " + span_message(msg)) + "</span>")
|
||||
@@ -163,7 +163,7 @@
|
||||
// Admins with RLOOC displayed who weren't already in
|
||||
for(var/client/admin in GLOB.admins)
|
||||
if(!(admin in receivers) && admin.prefs?.read_preference(/datum/preference/toggle/holder/show_rlooc))
|
||||
if(check_rights(R_SERVER, FALSE, admin)) //Stop rLOOC showing for retired staff
|
||||
if(check_rights_for(admin, R_SERVER)) //Stop rLOOC showing for retired staff
|
||||
r_receivers |= admin
|
||||
|
||||
msg = GLOB.is_valid_url.Replace(msg,span_linkify("$1"))
|
||||
|
||||
@@ -73,19 +73,19 @@
|
||||
if(C.holder.fakekey && !check_rights_for(src, R_ADMIN|R_MOD)) // Only admins and mods can see stealthmins
|
||||
continue
|
||||
// VOREStation Edit End
|
||||
if(check_rights(R_BAN, FALSE, C)) // admins //VOREStation Edit
|
||||
if(check_rights_for(C, R_BAN)) // admins //VOREStation Edit
|
||||
num_admins_online++
|
||||
else if(check_rights(R_ADMIN, FALSE, C) && !check_rights(R_SERVER, FALSE, C)) // mods //VOREStation Edit: Game masters
|
||||
else if(check_rights_for(C, R_ADMIN) && !check_rights_for(C, R_SERVER)) // mods //VOREStation Edit: Game masters
|
||||
category = R_MOD
|
||||
num_mods_online++
|
||||
else if(check_rights(R_SERVER, FALSE, C)) // developers
|
||||
else if(check_rights_for(C, R_SERVER)) // developers
|
||||
category = R_SERVER
|
||||
num_devs_online++
|
||||
else if(check_rights(R_STEALTH, FALSE, C)) // event managers //VOREStation Edit: Retired Staff
|
||||
else if(check_rights_for(C, R_STEALTH)) // event managers //VOREStation Edit: Retired Staff
|
||||
category = R_EVENT
|
||||
num_event_managers_online++
|
||||
|
||||
temp += "\t[C] is a [C.holder.rank]"
|
||||
temp += "\t[C] is a [C.holder.rank_names()]"
|
||||
if(holder)
|
||||
if(C.holder.fakekey)
|
||||
temp += " " + span_italics("(as [C.holder.fakekey])")
|
||||
|
||||
Reference in New Issue
Block a user