mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2026-08-24 05:38:15 +01:00
Configuration Controller (#7857)
This commit is contained in:
@@ -133,7 +133,7 @@
|
||||
//// VOREstation Additions Below
|
||||
|
||||
/datum/ticket/proc/send2adminchat()
|
||||
if(!config.chat_webhook_url)
|
||||
if(!CONFIG_GET(string/chat_webhook_url)) // CHOMPEdit
|
||||
return
|
||||
|
||||
var/list/adm = get_admin_counts()
|
||||
@@ -142,12 +142,12 @@
|
||||
|
||||
spawn(0) //Unreliable world.Exports()
|
||||
var/query_string = "type=adminhelp"
|
||||
query_string += "&key=[url_encode(config.chat_webhook_key)]"
|
||||
query_string += "&key=[url_encode(CONFIG_GET(string/chat_webhook_key))]" // CHOMPEdit
|
||||
query_string += "&from=[url_encode(key_name(initiator))]"
|
||||
query_string += "&msg=[url_encode(html_decode(name))]"
|
||||
query_string += "&admin_number=[allmins.len]"
|
||||
query_string += "&admin_number_afk=[afkmins.len]"
|
||||
world.Export("[config.chat_webhook_url]?[query_string]")
|
||||
world.Export("[CONFIG_GET(string/chat_webhook_url)]?[query_string]") // CHOMPEdit
|
||||
|
||||
/client/verb/adminspice()
|
||||
set category = "Admin"
|
||||
|
||||
@@ -11,16 +11,16 @@ Reason: Replaced with "Tickets System". Main logic has been moved to: modular_ch
|
||||
// CHOMPEdit Begin
|
||||
/proc/get_ahelp_channel()
|
||||
var/datum/tgs_api/v5/api = TGS_READ_GLOBAL(tgs)
|
||||
if(istype(api) && config.ahelp_channel_tag)
|
||||
if(istype(api) && CONFIG_GET(string/ahelp_channel_tag))
|
||||
for(var/datum/tgs_chat_channel/channel in api.chat_channels)
|
||||
if(channel.custom_tag == config.ahelp_channel_tag)
|
||||
if(channel.custom_tag == CONFIG_GET(string/ahelp_channel_tag))
|
||||
return list(channel)
|
||||
return 0
|
||||
|
||||
/proc/ahelp_discord_message(var/message)
|
||||
if(!message)
|
||||
return
|
||||
if(config.discord_ahelps_disabled)
|
||||
if(CONFIG_GET(flag/discord_ahelps_disabled))
|
||||
return
|
||||
var/datum/tgs_chat_channel/ahelp_channel = get_ahelp_channel()
|
||||
if(ahelp_channel)
|
||||
@@ -316,7 +316,7 @@ GLOBAL_DATUM_INIT(tickets, /datum/tickets, new)
|
||||
|
||||
/datum/ticket/proc/AddInteraction(formatted_message)
|
||||
var/curinteraction = "[gameTimestamp()]: [formatted_message]"
|
||||
if(config.discord_ahelps_all) //CHOMPEdit
|
||||
if(CONFIG_GET(flag/discord_ahelps_all)) //CHOMPEdit
|
||||
ahelp_discord_message("ADMINHELP: TICKETID:[id] [strip_html_properly(curinteraction)]") //CHOMPEdit
|
||||
_interactions += curinteraction
|
||||
|
||||
|
||||
Reference in New Issue
Block a user