mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-24 12:37:26 +01:00
Yeet
This commit is contained in:
@@ -39,9 +39,32 @@ SUBSYSTEM_DEF(redis)
|
||||
rustg_redis_subscribe(RCB.channel)
|
||||
subbed_channels[RCB.channel] = RCB
|
||||
|
||||
// Send our presence to required channels
|
||||
var/list/presence_data = list()
|
||||
presence_data["author"] = "system"
|
||||
presence_data["source"] = GLOB.configuration.system.instance_id
|
||||
presence_data["message"] = "Connected at `[SQLtime()]` during round [GLOB.round_id]"
|
||||
|
||||
var/presence_text = json_encode(presence_data)
|
||||
|
||||
for(var/channel in list("byond.asay", "byond.msay")) // Channels to announce to
|
||||
publish(channel, presence_text)
|
||||
|
||||
var/amount_registered = length(subbed_channels)
|
||||
log_startup_progress("Registered [amount_registered] callback[amount_registered == 1 ? "" : "s"].")
|
||||
|
||||
/datum/controller/subsystem/redis/Shutdown()
|
||||
// Send our presence to required channels
|
||||
var/list/presence_data = list()
|
||||
presence_data["author"] = "system"
|
||||
presence_data["source"] = GLOB.configuration.system.instance_id
|
||||
presence_data["message"] = "Disconnected at `[SQLtime()]` during round [GLOB.round_id]"
|
||||
|
||||
var/presence_text = json_encode(presence_data)
|
||||
|
||||
for(var/channel in list("byond.asay", "byond.msay")) // Channels to announce to
|
||||
publish(channel, presence_text)
|
||||
|
||||
|
||||
/datum/controller/subsystem/redis/fire()
|
||||
check_messages()
|
||||
|
||||
Reference in New Issue
Block a user