mirror of
https://github.com/Aurorastation/Aurora.3.git
synced 2025-12-21 15:42:35 +00:00
Adds LDAP but for 2d spessmen (#9527)
This commit is contained in:
@@ -120,3 +120,29 @@
|
||||
statuscode = 200
|
||||
response = "Text sent"
|
||||
return TRUE
|
||||
|
||||
//Reloads all admins via remote command. Updates from the forumuser API if enabled.
|
||||
/datum/topic_command/admins_reload
|
||||
name = "admins_reload"
|
||||
description = "Reloads all admins and pulls new data from the forumuser API if it's enabled."
|
||||
params = list(
|
||||
"senderkey" = list("name"="senderkey","desc"="A display friendly name for the sender.","req"=1,"type"="str")
|
||||
)
|
||||
|
||||
/datum/topic_command/broadcast_text/run_command(queryparams)
|
||||
log_and_message_admins("[queryparams["senderkey"]] initiated a remote reload of the admins list.")
|
||||
|
||||
if (config.use_forumuser_api)
|
||||
if (!update_admins_from_api(reload_once_done=FALSE))
|
||||
statuscode = 500
|
||||
response = "Updating admins from the forumuser API failed. Aborted."
|
||||
return FALSE
|
||||
else
|
||||
statuscode = 201
|
||||
response = "Admins updated from the forumuser API and reloaded."
|
||||
else
|
||||
statuscode = 200
|
||||
response = "Admins reloaded."
|
||||
|
||||
load_admins()
|
||||
return TRUE
|
||||
|
||||
Reference in New Issue
Block a user