mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-07-11 23:23:28 +01:00
Refactors asay+msay redis controllers (#18483)
This commit is contained in:
@@ -45,7 +45,6 @@ GLOBAL_LIST_INIT(admin_verbs_admin, list(
|
||||
/datum/admins/proc/toggleemoji, /*toggles using emoji in ooc for everyone*/
|
||||
/client/proc/game_panel, /*game panel, allows to change game-mode etc*/
|
||||
/client/proc/cmd_admin_say, /*admin-only ooc chat*/
|
||||
/client/proc/gsay, /*cross-server asay*/
|
||||
/datum/admins/proc/PlayerNotes,
|
||||
/client/proc/cmd_mentor_say,
|
||||
/datum/admins/proc/show_player_notes,
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
data["author"] = usr.ckey
|
||||
data["source"] = GLOB.configuration.system.instance_id
|
||||
data["message"] = msg
|
||||
SSredis.publish("byond.asay.out", json_encode(data))
|
||||
SSredis.publish("byond.asay", json_encode(data))
|
||||
|
||||
for(var/client/C in GLOB.admins)
|
||||
if(R_ADMIN & C.holder.rights)
|
||||
@@ -64,7 +64,7 @@
|
||||
data["author"] = usr.ckey
|
||||
data["source"] = GLOB.configuration.system.instance_id
|
||||
data["message"] = msg
|
||||
SSredis.publish("byond.msay.out", json_encode(data))
|
||||
SSredis.publish("byond.msay", json_encode(data))
|
||||
|
||||
for(var/client/C in GLOB.admins)
|
||||
if(check_rights(R_ADMIN|R_MOD|R_MENTOR, 0, C.mob))
|
||||
|
||||
@@ -1,27 +0,0 @@
|
||||
// GSAY
|
||||
// Like asay but global between instances!
|
||||
// *Insert changeling hivemind :g joke here*
|
||||
|
||||
// TODO - May as well fold this into regular asay. We already have it global enough with the discord integration.
|
||||
// Same with msay
|
||||
/client/proc/gsay(msg as text)
|
||||
set name = "gsay"
|
||||
set hidden = TRUE
|
||||
if(!check_rights(R_ADMIN))
|
||||
return
|
||||
|
||||
if(!msg)
|
||||
return
|
||||
|
||||
// Sanitize it all
|
||||
msg = sanitize(copytext(msg, 1, MAX_MESSAGE_LEN))
|
||||
|
||||
var/datum/server_command/gsay/GS = SSinstancing.registered_commands["gsay"]
|
||||
GS.custom_dispatch(usr.ckey, msg)
|
||||
|
||||
// Send to online admins
|
||||
for(var/client/C in GLOB.admins)
|
||||
if(C.holder.rights & R_ADMIN)
|
||||
to_chat(C, "<span class='admin_channel'>GSAY: [usr.ckey]@[GLOB.configuration.system.instance_id]: [msg]</span>")
|
||||
|
||||
SSblackbox.record_feedback("tally", "admin_verb", 1, "gsay") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
Reference in New Issue
Block a user