Fix API whitelist (#1061)

Fixes the config.api_rate_limit_whitelist to have proper true values associated with the indexes after startup. This way, the index grab method of checking for a list entry (which the api_do_auth_check proc uses) works.
This commit is contained in:
skull132
2016-10-17 12:22:27 +03:00
committed by GitHub
parent f8888fa55f
commit 95acdacaf9
+6
View File
@@ -14,6 +14,12 @@
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
/world/proc/api_do_auth_check(var/addr, var/auth, var/datum/topic_command/command)