Implemented adminhelp relay to discord.

* Adminhelp messages get sent to discord via the chat webhook.
This commit is contained in:
Leshana
2017-02-04 15:51:48 -05:00
parent 94b621b310
commit 654a6bae03

View File

@@ -116,5 +116,16 @@ var/list/adminhelp_ignored_words = list("unknown","the","a","an","of","monkey","
else else
send2adminirc("Request for Help from [key_name(src)]: [html_decode(original_msg)]") 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! 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 return