mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2025-12-13 19:22:20 +00:00
* Cleanup up all instances of using var/ definitions in proc parameters. (#52728) * var/list cleanup * The rest of the owl * plushvar bad * Can't follow my own advice. * Cleanup up all instances of using var/ definitions in proc parameters. Co-authored-by: Timberpoes <silent_insomnia_pp@hotmail.co.uk>
24 lines
477 B
Plaintext
24 lines
477 B
Plaintext
#define WHITELISTFILE "[global.config.directory]/whitelist.txt"
|
|
|
|
GLOBAL_LIST(whitelist)
|
|
GLOBAL_PROTECT(whitelist)
|
|
|
|
/proc/load_whitelist()
|
|
GLOB.whitelist = list()
|
|
for(var/line in world.file2list(WHITELISTFILE))
|
|
if(!line)
|
|
continue
|
|
if(findtextEx(line,"#",1,2))
|
|
continue
|
|
GLOB.whitelist += ckey(line)
|
|
|
|
if(!GLOB.whitelist.len)
|
|
GLOB.whitelist = null
|
|
|
|
/proc/check_whitelist(ckey)
|
|
if(!GLOB.whitelist)
|
|
return FALSE
|
|
. = (ckey in GLOB.whitelist)
|
|
|
|
#undef WHITELISTFILE
|