Ban/unban, note/unnote, kick to webhook

This commit is contained in:
Aronai Sieyes
2020-01-15 21:26:56 -05:00
parent 7169e2869c
commit fec8571d65
5 changed files with 20 additions and 5 deletions

View File

@@ -52,3 +52,16 @@
if(sender)
query_string += "&from=[url_encode(sender)]"
world.Export("[config.chat_webhook_url]?[query_string]")
/proc/admin_action_message(var/admin = "INVALID", var/user = "INVALID", var/action = "INVALID", var/reason = "INVALID", var/time = "INVALID")
if (!config.chat_webhook_url || !action)
return
spawn(0)
var/query_string = "type=adminaction"
query_string += "&key=[url_encode(config.chat_webhook_key)]"
query_string += "&admin=[url_encode(admin)]"
query_string += "&user=[url_encode(user)]"
query_string += "&action=[url_encode(action)]"
query_string += "&reason=[url_encode(reason)]"
query_string += "&time=[url_encode(time)]"
world.Export("[config.chat_webhook_url]?[query_string]")