Adds LDAP but for 2d spessmen (#9527)

This commit is contained in:
Erki
2020-08-10 14:56:39 +03:00
committed by GitHub
parent e717274903
commit 7097912fd1
20 changed files with 598 additions and 415 deletions

View File

@@ -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