forked from StarbloomSS13/StarbloomSS13
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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
- Loading branch information
1 parent
f46d9c9
commit f3acff4
Showing
7 changed files
with
46 additions
and
20 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
#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 |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
############################################################################################### | ||
# Basically, a list of ckeys who make it past user connection # | ||
# Case is not important for ckey. # | ||
############################################################################################### | ||
#Optimumtact | ||
#kevinz000 | ||
#Iamgoofball | ||
#Rshoe95 | ||
#That one penguin who became an admin |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters