From a491e364c3b12c937de8f979203062c440932ed5 Mon Sep 17 00:00:00 2001 From: Poojawa Date: Sat, 7 Apr 2018 22:33:42 -0500 Subject: [PATCH] Adjust permissions for Admin Observers (#6247) * adjusts permissions for the new political officer * Update admin_verbs.dm * adds +ADMIN checks to ahelp replies * Update admin_verbs.dm --- code/modules/admin/admin_verbs.dm | 34 ++++++++++++++--------------- code/modules/admin/verbs/adminpm.dm | 6 +++++ 2 files changed, 23 insertions(+), 17 deletions(-) diff --git a/code/modules/admin/admin_verbs.dm b/code/modules/admin/admin_verbs.dm index 1728b44d9f..76d3b95357 100644 --- a/code/modules/admin/admin_verbs.dm +++ b/code/modules/admin/admin_verbs.dm @@ -6,20 +6,13 @@ GLOBAL_LIST_INIT(admin_verbs_default, world.AVerbsDefault()) return list( /client/proc/deadmin, /*destroys our own admin datum so we can play as a regular player*/ /client/proc/cmd_admin_say, /*admin-only ooc chat*/ - /client/proc/hide_verbs, /*hides all our adminverbs*/ - /client/proc/hide_most_verbs, /*hides all our hideable adminverbs*/ - /client/proc/debug_variables, /*allows us to -see- the variables of any instance in the game. +VAREDIT needed to modify*/ - /client/proc/dsay, /*talk in deadchat using our ckey/fakekey*/ - /client/proc/investigate_show, /*various admintools for investigation. Such as a singulo grief-log*/ - /client/proc/secrets, - /client/proc/toggle_hear_radio, /*allows admins to hide all radio output*/ - /client/proc/reload_admins, - /client/proc/reestablish_db_connection, /*reattempt a connection to the database*/ - /client/proc/cmd_admin_pm_context, /*right-click adminPM interface*/ - /client/proc/cmd_admin_pm_panel, /*admin-pm list*/ /client/proc/cmd_admin_ticket_panel, - /client/proc/panicbunker, - /client/proc/stop_sounds + /client/proc/dsay, /*talk in deadchat using our ckey/fakekey*/ + /client/proc/deadchat, + /client/proc/investigate_show, /*various admintools for investigation. Such as a singulo grief-log*/ + /client/proc/debug_variables, /*allows us to -see- the variables of any instance in the game. +VAREDIT needed to modify*/ + /client/proc/toggleprayers, + /client/proc/toggleadminhelpsound ) GLOBAL_PROTECT(admin_verbs_admin) GLOBAL_LIST_INIT(admin_verbs_admin, world.AVerbsAdmin()) @@ -67,10 +60,17 @@ GLOBAL_LIST_INIT(admin_verbs_admin, world.AVerbsAdmin()) /client/proc/toggle_combo_hud, // toggle display of the combination pizza antag and taco sci/med/eng hud /client/proc/toggle_AI_interact, /*toggle admin ability to interact with machines as an AI*/ /client/proc/open_shuttle_manipulator, /* Opens shuttle manipulator UI */ - /client/proc/deadchat, - /client/proc/toggleprayers, - /client/proc/toggleadminhelpsound, - /client/proc/respawn_character + /client/proc/respawn_character, + /client/proc/secrets, + /client/proc/toggle_hear_radio, /*allows admins to hide all radio output*/ + /client/proc/reload_admins, + /client/proc/reestablish_db_connection, /*reattempt a connection to the database*/ + /client/proc/cmd_admin_pm_context, /*right-click adminPM interface*/ + /client/proc/cmd_admin_pm_panel, /*admin-pm list*/ + /client/proc/panicbunker, + /client/proc/stop_sounds, + /client/proc/hide_verbs, /*hides all our adminverbs*/ + /client/proc/hide_most_verbs /*hides all our hideable adminverbs*/ ) GLOBAL_PROTECT(admin_verbs_ban) GLOBAL_LIST_INIT(admin_verbs_ban, list(/client/proc/unban_panel, /client/proc/DB_ban_panel, /client/proc/stickybanpanel)) diff --git a/code/modules/admin/verbs/adminpm.dm b/code/modules/admin/verbs/adminpm.dm index 2e12f53608..eb861b7b07 100644 --- a/code/modules/admin/verbs/adminpm.dm +++ b/code/modules/admin/verbs/adminpm.dm @@ -8,6 +8,9 @@ if(!holder) to_chat(src, "Error: Admin-PM-Context: Only administrators may use this command.") return + if(holder && !check_rights(R_ADMIN, TRUE)) + to_chat(src, "Error: Admin-PM-Context: Only administrators may use this command.") + return if( !ismob(M) || !M.client ) return cmd_admin_pm(M.client,null) @@ -20,6 +23,9 @@ if(!holder) to_chat(src, "Error: Admin-PM-Panel: Only administrators may use this command.") return + if(holder && !check_rights(R_ADMIN, TRUE)) + to_chat(src, "Error: Admin-PM-Context: Only administrators may use this command.") + return var/list/client/targets[0] for(var/client/T) if(T.mob)