diff --git a/code/modules/admin/IsBanned.dm b/code/modules/admin/IsBanned.dm index 87a489b1891..91597bcfefd 100644 --- a/code/modules/admin/IsBanned.dm +++ b/code/modules/admin/IsBanned.dm @@ -3,22 +3,23 @@ world/IsBanned(key,address,computer_id) if(ckey(key) in admin_datums) return ..() + //Guest Checking + if(!guests_allowed && IsGuestKey(key)) + log_access("Failed Login: [key] - Guests not allowed") + message_admins("\blue Failed Login: [key] - Guests not allowed") + return list("reason"="guest", "desc"="\nReason: Guests not allowed. Please sign in with a byond account.") + + //check if the IP address is a known TOR node + if(config && config.ToRban && ToRban_isbanned(address)) + log_access("Failed Login: [src] - Banned: ToR") + message_admins("\blue Failed Login: [src] - Banned: ToR") + //ban their computer_id and ckey for posterity + AddBan(ckey(key), computer_id, "Use of ToR", "Automated Ban", 0, 0) + return list("reason"="Using ToR", "desc"="\nReason: The network you are using to connect has been banned.\nIf you believe this is a mistake, please request help at [config.banappeals]") + + if(config.ban_legacy_system) - //Guest Checking - if( !guests_allowed && IsGuestKey(key) ) - log_access("Failed Login: [key] - Guests not allowed") - message_admins("\blue Failed Login: [key] - Guests not allowed") - return list("reason"="guest", "desc"="\nReason: Guests not allowed. Please sign in with a byond account.") - - //check if the IP address is a known TOR node - if( config && config.ToRban && ToRban_isbanned(address) ) - log_access("Failed Login: [src] - Banned: ToR") - message_admins("\blue Failed Login: [src] - Banned: ToR") - //ban their computer_id and ckey for posterity - AddBan(ckey(key), computer_id, "Use of ToR", "Automated Ban", 0, 0) - return list("reason"="Using ToR", "desc"="\nReason: The network you are using to connect has been banned.\nIf you believe this is a mistake, please request help at [config.banappeals]") - //Ban Checking . = CheckBan( ckey(key), computer_id, address ) if(.) diff --git a/config/config.txt b/config/config.txt index 7e0092bc965..e97220ae463 100644 --- a/config/config.txt +++ b/config/config.txt @@ -128,7 +128,7 @@ HOSTEDBY Yournamehere # GUEST_JOBBAN ## Uncomment this to stop people connecting to your server without a registered ckey. (i.e. guest-* are all blocked from connecting) -# GUEST_BAN +GUEST_BAN ## Set to jobban everyone who's key is not listed in data/whitelist.txt from Captain, HoS, HoP, CE, RD, CMO, Warden, Security, Detective, and AI positions. ## Uncomment to 1 to jobban, leave commented out to allow these positions for everyone (but see GUEST_JOBBAN above and regular jobbans)