mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-11 10:43:20 +00:00
Ban/unban, note/unnote, kick to webhook
This commit is contained in:
@@ -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]")
|
||||
|
||||
Reference in New Issue
Block a user