mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-13 11:43:31 +00:00
Various and sundry admin messages
This commit is contained in:
@@ -38,4 +38,17 @@
|
||||
part2 = total-part2
|
||||
part3 = -part3
|
||||
|
||||
return list(part1, part2, part3)
|
||||
return list(part1, part2, part3)
|
||||
|
||||
//Sender is optional
|
||||
/proc/admin_chat_message(var/message = "Debug Message", var/color = "#FFFFFF", var/sender)
|
||||
if (!config.chat_webhook_url || !message)
|
||||
return
|
||||
spawn(0)
|
||||
var/query_string = "type=adminalert"
|
||||
query_string += "&key=[url_encode(config.chat_webhook_key)]"
|
||||
query_string += "&msg=[url_encode(message)]"
|
||||
query_string += "&color=[url_encode(color)]"
|
||||
if(sender)
|
||||
query_string += "&from=[url_encode(sender)]"
|
||||
world.Export("[config.chat_webhook_url]?[query_string]")
|
||||
|
||||
@@ -458,6 +458,7 @@
|
||||
emergency_shuttle.call_evac()
|
||||
log_game("[key_name(user)] has called the shuttle.")
|
||||
message_admins("[key_name_admin(user)] has called the shuttle.", 1)
|
||||
admin_chat_message(message = "Emergency evac beginning! Called by [key_name(user)]!", color = "#CC2222") //VOREStation Add
|
||||
|
||||
|
||||
return
|
||||
@@ -505,6 +506,7 @@
|
||||
|
||||
log_game("[user? key_name(user) : "Autotransfer"] has called the shuttle.")
|
||||
message_admins("[user? key_name_admin(user) : "Autotransfer"] has called the shuttle.", 1)
|
||||
admin_chat_message(message = "Autotransfer shuttle dispatched, shift ending soon.", color = "#2277BB") //VOREStation Add
|
||||
|
||||
return
|
||||
|
||||
|
||||
@@ -1227,6 +1227,15 @@
|
||||
if((R_ADMIN|R_MOD|R_EVENT) & X.holder.rights)
|
||||
to_chat(X, take_msg)
|
||||
to_chat(M, "<span class='notice'><b>Your adminhelp is being attended to by [usr.client]. Thanks for your patience!</b></span>")
|
||||
// VoreStation Edit Start
|
||||
if (config.chat_webhook_url)
|
||||
spawn(0)
|
||||
var/query_string = "type=admintake"
|
||||
query_string += "&key=[url_encode(config.chat_webhook_key)]"
|
||||
query_string += "&admin=[url_encode(key_name(usr.client))]"
|
||||
query_string += "&user=[url_encode(key_name(M))]"
|
||||
world.Export("[config.chat_webhook_url]?[query_string]")
|
||||
// VoreStation Edit End
|
||||
else
|
||||
to_chat(usr, "<span class='warning'>Unable to locate mob.</span>")
|
||||
|
||||
|
||||
@@ -149,6 +149,7 @@
|
||||
//Public alerts
|
||||
if((damage > emergency_point) && !public_alert)
|
||||
global_announcer.autosay("WARNING: SUPERMATTER CRYSTAL DELAMINATION IMMINENT!", "Supermatter Monitor")
|
||||
admin_chat_message(message = "SUPERMATTER DELAMINATING!", color = "#FF2222") //VOREStation Add
|
||||
public_alert = 1
|
||||
else if(safe_warned && public_alert)
|
||||
global_announcer.autosay(alert_msg, "Supermatter Monitor")
|
||||
|
||||
@@ -54,7 +54,7 @@
|
||||
atc.reroute_traffic(yes = 1) // Tell them fuck off we're busy.
|
||||
else
|
||||
atc.reroute_traffic(yes = 0)
|
||||
|
||||
admin_chat_message(message = "Security level is now: [uppertext(get_security_level())]", color = "#CC2222") //VOREStation Add
|
||||
|
||||
/proc/get_security_level()
|
||||
switch(security_level)
|
||||
|
||||
Reference in New Issue
Block a user