mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-07-12 07:33:34 +01:00
Committing a fix (hopefully) for guest banning. I couldn't get it to work during testing, but I suspect that's because I'm connecting locally. It shouldn't make anything worse, certainly.
Setting GUEST_BAN to be enabled by default. git-svn-id: http://tgstation13.googlecode.com/svn/trunk@5303 316c924e-a436-60f5-8080-3fe189b3f50e
This commit is contained in:
@@ -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(.)
|
||||
|
||||
Reference in New Issue
Block a user