mirror of
https://github.com/vgstation-coders/vgstation13.git
synced 2025-12-10 10:21:11 +00:00
Discord MoMMI routing refactor. (#17112)
Now correctly uses meta routes instead of admin y/n. None of you know what this means so just merge this ¯\_(ツ)_/¯.
This commit is contained in:
@@ -1,12 +1,18 @@
|
||||
// Sends to the SERVER STATUS channels.
|
||||
// This sends to the "server_status" gamenudge route.
|
||||
/proc/send2maindiscord(var/msg)
|
||||
send2discord(msg, FALSE)
|
||||
send2discord(msg, "server_status")
|
||||
|
||||
// Sends to the adminbus ahelp channels.
|
||||
// This sends to the "adminhelp" gamenudge route.
|
||||
/proc/send2admindiscord(var/msg, var/ping = FALSE)
|
||||
send2discord(msg, TRUE, ping)
|
||||
send2discord(msg, "adminhelp", ping)
|
||||
|
||||
/proc/send2discord(var/msg, var/admin = FALSE, var/ping = FALSE)
|
||||
// Meta argument here is the MoMMI meta argument to send to the gamenudge route.
|
||||
// AKA the MoMMI config file chooses where to send it based on this key.
|
||||
/proc/send2discord(var/msg, var/meta, var/ping = FALSE)
|
||||
if (!global.config.discord_url || !global.config.discord_password)
|
||||
return
|
||||
|
||||
var/url = "[global.config.discord_url]?pass=[url_encode(global.config.discord_password)]&admin=[admin ? "true" : "false"]&content=[url_encode(msg)]&ping=[ping ? "true" : "false"]"
|
||||
var/url = "[global.config.discord_url]?pass=[url_encode(global.config.discord_password)]&meta=[url_encode(meta)]&content=[url_encode(msg)]&ping=[ping ? "true" : "false"]"
|
||||
world.Export(url)
|
||||
|
||||
Reference in New Issue
Block a user