mirror of
https://github.com/Aurorastation/Aurora.3.git
synced 2025-12-24 17:11:22 +00:00
API refactor + update (#6127)
This commit is contained in:
16
code/modules/world_api/helpers.dm
Normal file
16
code/modules/world_api/helpers.dm
Normal file
@@ -0,0 +1,16 @@
|
||||
//Init the API at startup
|
||||
/hook/startup/proc/setup_api()
|
||||
for (var/path in typesof(/datum/topic_command) - /datum/topic_command)
|
||||
var/datum/topic_command/A = new path()
|
||||
if(A != null)
|
||||
topic_commands[A.name] = A
|
||||
topic_commands_names.Add(A.name)
|
||||
listclearnulls(topic_commands)
|
||||
listclearnulls(topic_commands_names)
|
||||
|
||||
if (config.api_rate_limit_whitelist.len)
|
||||
// To make the api_rate_limit_whitelist[addr] grabs actually work.
|
||||
for (var/addr in config.api_rate_limit_whitelist)
|
||||
config.api_rate_limit_whitelist[addr] = 1
|
||||
|
||||
return 1
|
||||
Reference in New Issue
Block a user