Skip to content

Commit

Permalink
x
Browse files Browse the repository at this point in the history
  • Loading branch information
realforest2001 committed Jul 10, 2023
1 parent 99adec9 commit f49a226
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 6 deletions.
2 changes: 1 addition & 1 deletion code/game/verbs/who.dm
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@
var/dat = ""
var/list/mappings
if(CONFIG_GET(flag/show_manager))
LAZYSET(mappings, "<B style='color:purple'>Management</B>", R_HOST)
LAZYSET(mappings, "<B style='color:purple'>Management</B>", R_PERMISSIONS)
if(CONFIG_GET(flag/show_devs))
LAZYSET(mappings, "<B style='color:blue'>Maintainers</B>", R_PROFILER)
LAZYSET(mappings, "<B style='color:red'>Admins</B>", R_ADMIN)
Expand Down
7 changes: 4 additions & 3 deletions code/global.dm
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,10 @@
#define R_NOLOCK (1<<17)
#define R_EVENT (1<<18)

/// The sum of all other rank permissions.
#define R_EVERYTHING ((1<<19)-1)

/// The sum of all other rank permissions, other than host or profiler.
#define RL_EVERYTHING (R_BUILDMODE|R_ADMIN|R_BAN|R_SERVER|R_DEBUG|R_PERMISSIONS|R_POSSESS|R_STEALTH|R_REJUVINATE|R_COLOR|R_VAREDIT|R_EVENT|R_SOUNDS|R_NOLOCK|R_SPAWN|R_MOD|R_MENTOR)
/// Truely everything
#define RL_HOST (RL_EVERYTHING|R_HOST|R_PROFILER)
// 512.1430 increases maximum bit flags from 16 to 24, so the following flags should be available for future changes:
//=================================================

Expand Down
3 changes: 2 additions & 1 deletion code/modules/admin/admin_ranks.dm
Original file line number Diff line number Diff line change
Expand Up @@ -38,13 +38,14 @@ var/list/admin_ranks = list() //list of all ranks with associated rights
if("color") rights |= R_COLOR
if("varedit") rights |= R_VAREDIT
if("event") rights |= R_EVENT
if("everything","host","all") rights |= (R_HOST|R_BUILDMODE|R_ADMIN|R_BAN|R_SERVER|R_DEBUG|R_PERMISSIONS|R_POSSESS|R_STEALTH|R_REJUVINATE|R_COLOR|R_VAREDIT|R_EVENT|R_SOUNDS|R_NOLOCK|R_SPAWN|R_MOD|R_MENTOR)
if("sound","sounds") rights |= R_SOUNDS
if("nolock") rights |= R_NOLOCK
if("spawn","create") rights |= R_SPAWN
if("mod") rights |= R_MOD
if("mentor") rights |= R_MENTOR
if("profiler") rights |= R_PROFILER
if("host") rights |= RL_HOST
if("everything") rights |= RL_EVERYTHING

admin_ranks[rank] = rights
previous_rights = rights
Expand Down
2 changes: 1 addition & 1 deletion code/modules/client/client_procs.dm
Original file line number Diff line number Diff line change
Expand Up @@ -314,7 +314,7 @@ GLOBAL_LIST_INIT(whitelisted_client_procs, list(
if(!CONFIG_GET(flag/no_localhost_rank))
var/static/list/localhost_addresses = list("127.0.0.1", "::1")
if(isnull(address) || (address in localhost_addresses))
var/datum/admins/admin = new("!localhost!", R_EVERYTHING, ckey)
var/datum/admins/admin = new("!localhost!", RL_HOST, ckey)
admin.associate(src)
RoleAuthority.roles_whitelist[ckey] = WHITELIST_EVERYTHING

Expand Down

0 comments on commit f49a226

Please sign in to comment.