mirror of
https://github.com/fulpstation/fulpstation.git
synced 2025-12-10 01:34:12 +00:00
* 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
23 lines
412 B
Plaintext
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
|