autobunker

This commit is contained in:
silicons
2020-06-24 07:49:45 -07:00
parent 07c7432f43
commit b367f76c62
4 changed files with 74 additions and 1 deletions

View File

@@ -74,6 +74,25 @@
for(var/client/C in GLOB.clients)
C.AnnouncePR(final_composed)
/datum/world_topic/auto_bunker_passthrough
keyword = "auto_bunker_override"
require_comms_key = TRUE
/datum/world_topic/auto_bunker_passthrough/Run(list/input)
if(!CONFIG_GET(flag/allow_cross_server_bunker_override))
return "Function Disabled"
var/ckeytobypass = input["ckey"]
var/is_new_ckey = !(ckey(ckeytobypass) in GLOB.bunker_passthrough)
var/sender = input["source"] || "UNKNOWN"
GLOB.bunker_passthrough |= ckey(ckeytobypass)
GLOB.bunker_passthrough[ckey(ckeytobypass)] = world.realtime
SSpersistence.SavePanicBunker() //we can do this every time, it's okay
if(!is_new_ckey)
log_admin("AUTO BUNKER: [ckeytobypass] given access (incoming comms from [sender]).")
message_admins("AUTO BUNKER: [ckeytobypass] given access (incoming comms from [sender]).")
send2irc("Panic Bunker", "AUTO BUNKER: [ckeytobypass] given access (incoming comms from [sender]).")
return "Success"
/datum/world_topic/ahelp_relay
keyword = "Ahelp"
require_comms_key = TRUE