mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-07-12 07:33:34 +01:00
Migrates SSinstancing to Redis from world.Export() (#17679)
This commit is contained in:
@@ -2,6 +2,8 @@
|
||||
// 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
|
||||
@@ -10,18 +12,16 @@
|
||||
|
||||
if(!msg)
|
||||
return
|
||||
|
||||
// Sanitize it all
|
||||
msg = sanitize(copytext(msg, 1, MAX_MESSAGE_LEN))
|
||||
|
||||
// To whoever says "Why dont you just topic the full message with formatting"
|
||||
// This lets us use this in other apps, like a discord bot, without HTML parsing
|
||||
// It also removes a way to put whatever HTML we want in the chat window
|
||||
var/built_topic = "gsay&msg=[url_encode(msg)]&usr=[url_encode(usr.ckey)]&src=[url_encode(GLOB.configuration.system.instance_id)]"
|
||||
var/datum/server_command/gsay/GS = SSinstancing.registered_commands["gsay"]
|
||||
GS.custom_dispatch(usr.ckey, msg)
|
||||
|
||||
// Send to peers
|
||||
SSinstancing.topic_all_peers(built_topic)
|
||||
// Send to online admins
|
||||
for(var/client/C in GLOB.admins)
|
||||
if(R_ADMIN & C.holder.rights)
|
||||
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