diff --git a/code/datums/keybindings/communication_keybinds.dm b/code/datums/keybindings/communication_keybinds.dm index 973317d8e28..0cdb00e77a7 100644 --- a/code/datums/keybindings/communication_keybinds.dm +++ b/code/datums/keybindings/communication_keybinds.dm @@ -66,7 +66,7 @@ /datum/keybinding/client/communication/asay name = ADMIN_CHANNEL keys = list("F5") - required_rights = R_ADMIN + required_rights = R_ADMIN | R_MOD /datum/keybinding/client/communication/dsay name = DSAY_CHANNEL diff --git a/code/modules/admin/admin_verbs.dm b/code/modules/admin/admin_verbs.dm index 6dcbfa1797a..e94b2d95848 100644 --- a/code/modules/admin/admin_verbs.dm +++ b/code/modules/admin/admin_verbs.dm @@ -204,6 +204,7 @@ GLOBAL_LIST_INIT(admin_verbs_mod, list( /datum/admins/proc/PlayerNotes, /client/proc/admin_ghost, /*allows us to ghost/reenter body at will*/ /client/proc/cmd_mentor_say, + /client/proc/cmd_admin_say, /*admin-only ooc chat*/ /datum/admins/proc/show_player_notes, /client/proc/player_panel_new, /client/proc/dsay, diff --git a/code/modules/admin/verbs/adminsay.dm b/code/modules/admin/verbs/adminsay.dm index 69204b0f591..97cfd18f369 100644 --- a/code/modules/admin/verbs/adminsay.dm +++ b/code/modules/admin/verbs/adminsay.dm @@ -1,10 +1,12 @@ /client/proc/cmd_admin_say(msg as text) set name = "Asay" //Gave this shit a shorter name so you only have to time out "asay" rather than "admin say" to use it --NeoFite set hidden = 1 - if(!check_rights(R_ADMIN)) return + if(!check_rights(R_ADMIN|R_MOD)) + return msg = sanitize(copytext_char(msg, 1, MAX_MESSAGE_LEN)) - if(!msg) return + if(!msg) + return msg = handleDiscordEmojis(msg) @@ -12,22 +14,21 @@ GLOB.asays += asay log_adminsay(msg, src) - if(check_rights(R_ADMIN,0)) - for(var/client/C in GLOB.admins) - if(R_ADMIN & C.holder.rights) - // Lets see if this admin was pinged in the asay message - if(findtext(msg, "@[C.ckey]") || findtext(msg, "@[C.key]")) // Check ckey and key, so you can type @AffectedArc07 or @affectedarc07 - SEND_SOUND(C, 'sound/misc/ping.ogg') - msg = replacetext(msg, "@[C.ckey]", "@[C.ckey]") - msg = replacetext(msg, "@[C.key]", "@[C.key]") // Same applies here. key and ckey. + for(var/client/C in GLOB.admins) + if(check_rights(R_ADMIN|R_MOD, 0, C.mob)) + // Lets see if this admin was pinged in the asay message + if(findtext(msg, "@[C.ckey]") || findtext(msg, "@[C.key]")) // Check ckey and key, so you can type @AffectedArc07 or @affectedarc07 + SEND_SOUND(C, 'sound/misc/ping.ogg') + msg = replacetext(msg, "@[C.ckey]", "@[C.ckey]") + msg = replacetext(msg, "@[C.key]", "@[C.key]") // Same applies here. key and ckey. - msg = "[msg]" - to_chat(C, "ADMIN: [key_name(usr, 1)] ([admin_jump_link(mob)]): [msg]", MESSAGE_TYPE_ADMINCHAT, confidential = TRUE) + msg = "[msg]" + to_chat(C, "ADMIN: [key_name(usr, 1)] ([admin_jump_link(mob)]): [msg]", MESSAGE_TYPE_ADMINCHAT, confidential = TRUE) SSblackbox.record_feedback("tally", "admin_verb", 1, "Asay") //If you are copy-pasting this, ensure the 4th parameter is unique to the new proc! /client/proc/get_admin_say() - if(check_rights(R_ADMIN, FALSE)) + if(check_rights(R_ADMIN|R_MOD, FALSE)) var/msg = input(src, null, "asay \"text\"") as text|null cmd_admin_say(msg) else if(check_rights(R_MENTOR))