Files
fulpstation/code/modules/admin/whitelist.dm
oranges f3acff4706 Adds a ckey whitelist, stripping out some dead code (#21875)
* Adds a whitelist, stripping out some dead code in the process

Old job whitelist that wasn't used has been removed.

Config has been repurposed, uncomment USEWHITELIST, only ckey's in
admins.txt or whitelist.txt in the config will be allowed to connect to
the server

* More examples

* Add a guy

* Update whitelist.txt

* Put him in
2016-12-04 15:33:15 +11:00

23 lines
412 B
Plaintext

#define WHITELISTFILE "config/whitelist.txt"
var/list/whitelist
/proc/load_whitelist()
whitelist = list()
for(var/line in file2list(WHITELISTFILE))
if(!line)
continue
if(findtextEx(line,"#",1,2))
continue
whitelist += line
if(!whitelist.len)
whitelist = null
/proc/check_whitelist(var/ckey)
if(!whitelist)
return FALSE
. = (ckey in whitelist)
#undef WHITELISTFILE