Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Admins Transfer To DB #6772

Closed
wants to merge 15 commits into from
2 changes: 1 addition & 1 deletion code/__DEFINES/dcs/signals/signals_global.dm
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@
/// From /obj/structure/machinery/telecomms/proc/tcomms_shutdown(), called when the relay turns off
#define COMSIG_GLOB_GROUNDSIDE_TELECOMM_TURNED_OFF "!groundside_telecomm_turned_off"

/// From /datum/admins/proc/force_predator_round()
/// From /datum/view_record/admin_holder/proc/force_predator_round()
#define COMSIG_GLOB_PREDATOR_ROUND_TOGGLED "!predator_round_toglged"

/// From /datum/game_mode/colonialmarines/proc/check_ground_humans()
Expand Down
2 changes: 1 addition & 1 deletion code/__DEFINES/subsystems.dm
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,7 @@
// Subsystems shutdown in the reverse of the order they initialize in
// The numbers just define the ordering, they are meaningless otherwise.

#define SS_INIT_ENTITYMANAGER 87
#define SS_INIT_PROFILER 86
#define SS_INIT_INPUT 85
#define SS_INIT_TOPIC 83
Expand Down Expand Up @@ -145,7 +146,6 @@
#define SS_INIT_TICKER -21
#define SS_INIT_VOTE -23
#define SS_INIT_DATABASE -27
#define SS_INIT_ENTITYMANAGER -28
#define SS_INIT_PLAYTIME -29
#define SS_INIT_STICKY -30
#define SS_INIT_PREDSHIPS -31
Expand Down
2 changes: 1 addition & 1 deletion code/__HELPERS/game.dm
Original file line number Diff line number Diff line change
Expand Up @@ -255,7 +255,7 @@

// copied from join as xeno
var/deathtime = world.time - cur_obs.timeofdeath
if(deathtime < XENO_JOIN_DEAD_TIME && ( !cur_obs.client.admin_holder || !(cur_obs.client.admin_holder.rights & R_ADMIN)) && !cur_obs.bypass_time_of_death_checks)
if(deathtime < XENO_JOIN_DEAD_TIME && ( !cur_obs.client.admin_holder || !check_client_rights(cur_obs.client, R_ADMIN, FALSE)) && !cur_obs.bypass_time_of_death_checks)
continue

// AFK players cannot be drafted
Expand Down
6 changes: 3 additions & 3 deletions code/controllers/subsystem/events.dm
Original file line number Diff line number Diff line change
Expand Up @@ -99,12 +99,12 @@ SUBSYSTEM_DEF(events)
set name = "Trigger Event"
set category = "Admin.Events"

if(!admin_holder ||!check_rights(R_EVENT))
if(!check_rights(R_EVENT))
return

admin_holder.force_event()

/datum/admins/proc/force_event()
/datum/view_record/admin_holder/proc/force_event()
var/dat = ""
var/normal = ""

Expand All @@ -122,7 +122,7 @@ SUBSYSTEM_DEF(events)
set name = "Toggle Events Subsystem"
set category = "Admin.Events"

if(!admin_holder ||!check_rights(R_EVENT))
if(!check_rights(R_EVENT))
return

SSevents.can_fire = !SSevents.can_fire
Expand Down
2 changes: 1 addition & 1 deletion code/controllers/subsystem/inactivity.dm
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ SUBSYSTEM_DEF(inactivity)
return

for(var/client/current as anything in GLOB.clients)
if(current.admin_holder && current.admin_holder.rights & R_MOD) //Skip admins.
if(current.admin_holder && check_client_rights(current, R_MOD, FALSE)) //Skip admins.
continue
if(current.is_afk(INACTIVITY_KICK))
if(!istype(current.mob, /mob/dead))
Expand Down
2 changes: 1 addition & 1 deletion code/controllers/subsystem/statpanel.dm
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ SUBSYSTEM_DEF(statpanels)
if(!("Tickets" in target.panel_tabs))
target.stat_panel.send_message("add_admin_tabs", target.admin_holder.href_token)

if(!("MC" in target.panel_tabs) && target.admin_holder.rights & R_DEBUG)
if(!("MC" in target.panel_tabs) && check_client_rights(target, R_DEBUG, FALSE))
target.stat_panel.send_message("add_debug_tabs", target.admin_holder.href_token)

if(target.stat_tab == "MC" && ((num_fires % mc_wait == 0))) // || target?.prefs.read_preference(/datum/preference/toggle/fast_mc_refresh)))
Expand Down
2 changes: 1 addition & 1 deletion code/controllers/subsystem/vote.dm
Original file line number Diff line number Diff line change
Expand Up @@ -439,7 +439,7 @@ SUBSYSTEM_DEF(vote)

/datum/controller/subsystem/vote/ui_data(mob/user)
. = list()
.["is_admin"] = user.client.admin_holder?.rights & R_ADMIN // This can change if they deadmin.
.["is_admin"] = user.client.admin_holder?.admin_rank?.rights & R_ADMIN // This can change if they deadmin.

.["vote_in_progress"] = mode
.["vote_choices"] = choices
Expand Down
4 changes: 2 additions & 2 deletions code/datums/_ndatabase/subsystems/entity_manager.dm
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,10 @@
GLOBAL_REAL(SSentity_manager, /datum/controller/subsystem/entity_manager)

/datum/controller/subsystem/entity_manager
name = "Entity Manager"
name = "Entity Manager"
init_order = SS_INIT_ENTITYMANAGER
init_stage = INITSTAGE_EARLY
priority = SS_PRIORITY_ENTITY
priority = SS_PRIORITY_ENTITY
runlevels = RUNLEVELS_DEFAULT|RUNLEVEL_LOBBY
flags = SS_NO_INIT

Expand Down
2 changes: 1 addition & 1 deletion code/datums/datumvars.dm
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@
//href_list is a reference, modifying it in these procs WILL change the rest of the proc in topic.dm of admin/view_variables!
//This proc is for "high level" actions like admin heal/set species/etc/etc. The low level debugging things should go in admin/view_variables/topic_basic.dm incase this runtimes.
/datum/proc/vv_do_topic(list/href_list)
if(!usr || !usr.client || !usr.client.admin_holder || !check_rights(NONE))
if(!check_rights(NO_FLAGS))
return FALSE //This is VV, not to be called by anything else.
if(SEND_SIGNAL(src, COMSIG_VV_TOPIC, usr, href_list) & COMPONENT_VV_HANDLED)
return FALSE
Expand Down
Loading
Loading