diff --git a/code/game/jobs/whitelist.dm b/code/game/jobs/whitelist.dm index b47da0e77d..1f0463e319 100644 --- a/code/game/jobs/whitelist.dm +++ b/code/game/jobs/whitelist.dm @@ -14,6 +14,8 @@ var/list/whitelist return 0 return ("[M.ckey]" in whitelist) +var/list/alien_whitelist + proc/load_alienwhitelist() var/text = file2text("config/alienwhitelist.txt") if (!text) @@ -23,15 +25,14 @@ proc/load_alienwhitelist() /proc/is_alien_whitelisted(mob/M, var/species) if(!alien_whitelist) - return - if((M.client) && (M.client.holder) && (M.client.holder.level) && (M.client.holder.level >= 5)) - return 1 - if(M && species) + return 0 + if((M.client) && (M.client.holder) && (M.client.holder.level) && (M.client.holder.level >= 5)) return 1 if(M && species) for (var/s in alien_whitelist) if(findtext(s,"[M.ckey] - [species]")) return 1 if(findtext(s,"[M.ckey] - All")) return 1 - return 0 + + return 0 #undef WHITELISTFILE \ No newline at end of file diff --git a/code/global.dm b/code/global.dm index 3f10c8f749..dcb1dc0bb2 100644 --- a/code/global.dm +++ b/code/global.dm @@ -106,7 +106,6 @@ var/list/prisonsecuritywarp = list() //prison security goes to these var/list/prisonwarped = list() //list of players already warped var/list/blobstart = list() // list/traitors = list() //traitor list -var/list/alien_whitelist = list( ) var/list/cardinal = list( NORTH, SOUTH, EAST, WEST ) var/list/alldirs = list(NORTH, SOUTH, EAST, WEST, NORTHEAST, NORTHWEST, SOUTHEAST, SOUTHWEST) diff --git a/code/modules/mob/new_player/preferences.dm b/code/modules/mob/new_player/preferences.dm index 2990baa20d..b80e1eda23 100644 --- a/code/modules/mob/new_player/preferences.dm +++ b/code/modules/mob/new_player/preferences.dm @@ -739,12 +739,13 @@ datum/preferences if(is_alien_whitelisted(user, "Skrell")) //Check for Skrell and admins new_species += "Skrell" whitelisted = 1 + + if(!whitelisted) + alert(user, "You cannot change your species as you need to be whitelisted. If you wish to be whitelisted contact an admin in-game, on the forums, or on IRC.") else //Not using the whitelist? Aliens for everyone! new_species += "Tajaran" new_species += "Soghun" new_species += "Skrell" - if(!whitelisted && config.usealienwhitelist) - alert(user, "You cannot change your species as you need to be whitelisted. If you wish to be whitelisted contact an admin in-game, on the forums, or on IRC.") species = input("Please select a species", "Character Generation", null) in new_species if(prev_species != species) //grab one of the valid hair styles for the newly chosen species diff --git a/code/world.dm b/code/world.dm index 387ffdd5e3..7b1dc82980 100644 --- a/code/world.dm +++ b/code/world.dm @@ -22,6 +22,8 @@ investigate_reset() if (config.usewhitelist) load_whitelist() + if (config.usealienwhitelist) + load_alienwhitelist() LoadBansjob() Get_Holiday() //~Carn, needs to be here when the station is named so :P src.update_status()