mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-10 10:12:45 +00:00
Merge pull request #14641 from Heroman3003/admin-perm-fixes-also-sound
Fixes some admin perms not being properly checked
This commit is contained in:
@@ -279,6 +279,8 @@ GLOBAL_DATUM_INIT(ahelp_tickets, /datum/admin_help_tickets, new)
|
||||
//send this msg to all admins
|
||||
|
||||
for(var/client/X in GLOB.admins)
|
||||
if(!check_rights(R_ADMIN, 0, X))
|
||||
continue
|
||||
if(X.is_preference_enabled(/datum/client_preference/holder/play_adminhelp_ping))
|
||||
X << 'sound/effects/adminhelp.ogg'
|
||||
window_flash(X)
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
/client/proc/cmd_admin_pm_context(mob/M in mob_list)
|
||||
set category = null
|
||||
set name = "Admin PM Mob"
|
||||
if(!holder)
|
||||
if(!check_rights(R_ADMIN))
|
||||
to_chat(src, "<span class='pm warning'>Error: Admin-PM-Context: Only administrators may use this command.</span>")
|
||||
return
|
||||
if( !ismob(M) || !M.client )
|
||||
@@ -17,7 +17,7 @@
|
||||
/client/proc/cmd_admin_pm_panel()
|
||||
set category = "Admin"
|
||||
set name = "Admin PM"
|
||||
if(!holder)
|
||||
if(!check_rights(R_ADMIN))
|
||||
to_chat(src, "<span class='pm warning'>Error: Admin-PM-Panel: Only administrators may use this command.</span>")
|
||||
return
|
||||
var/list/client/targets[0]
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
log_adminsay(msg,src)
|
||||
|
||||
for(var/client/C in GLOB.admins)
|
||||
if(check_rights(R_ADMIN))
|
||||
if(check_rights(R_ADMIN, 0, C))
|
||||
to_chat(C, "<span class='admin_channel'>" + create_text_tag("admin", "ADMIN:", C) + " <span class='name'>[key_name(usr, 1)]</span>([admin_jump_link(mob, src)]): <span class='message'>[msg]</span></span>")
|
||||
|
||||
feedback_add_details("admin_verb","M") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
|
||||
@@ -224,7 +224,7 @@
|
||||
return TOPIC_REFRESH
|
||||
|
||||
else if(href_list["voice_test"])
|
||||
var/sound/S = pick(pref.voice_sound)
|
||||
var/sound/S
|
||||
switch(pref.voice_sound)
|
||||
if("beep-boop")
|
||||
S = sound(pick(talk_sound))
|
||||
@@ -254,8 +254,9 @@
|
||||
S = sound(pick(goon_speak_roach_sound))
|
||||
if("goon speak skelly")
|
||||
S = sound(pick(goon_speak_skelly_sound))
|
||||
S.frequency = pick(pref.voice_freq)
|
||||
S.volume = 50
|
||||
SEND_SOUND(user, S)
|
||||
if(S)
|
||||
S.frequency = pick(pref.voice_freq)
|
||||
S.volume = 50
|
||||
SEND_SOUND(user, S)
|
||||
|
||||
return ..();
|
||||
Reference in New Issue
Block a user