From 654a6bae03ab78d42d23de37b9a58e3319a7b278 Mon Sep 17 00:00:00 2001 From: Leshana Date: Sat, 4 Feb 2017 15:51:48 -0500 Subject: [PATCH] Implemented adminhelp relay to discord. * Adminhelp messages get sent to discord via the chat webhook. --- code/modules/admin/verbs/adminhelp.dm | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/code/modules/admin/verbs/adminhelp.dm b/code/modules/admin/verbs/adminhelp.dm index 90d9c9d275..2f09a80489 100644 --- a/code/modules/admin/verbs/adminhelp.dm +++ b/code/modules/admin/verbs/adminhelp.dm @@ -116,5 +116,16 @@ var/list/adminhelp_ignored_words = list("unknown","the","a","an","of","monkey"," else send2adminirc("Request for Help from [key_name(src)]: [html_decode(original_msg)]") feedback_add_details("admin_verb","AH") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc! + // VoreStation Edit Start + if (config.chat_webhook_url) + spawn(0) + var/query_string = "type=adminhelp" + query_string += "&key=[url_encode(config.chat_webhook_key)]" + query_string += "&from=[url_encode(key_name(src))]" + query_string += "&msg=[url_encode(html_decode(original_msg))]" + query_string += "&admin_number=[admins.len]" + query_string += "&admin_number_afk=[admin_number_afk]" + world.Export("[config.chat_webhook_url]?[query_string]") + // VoreStation Edit End return