mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-11 10:43:20 +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]")
|
||||
|
||||
Reference in New Issue
Block a user