Configuration Controller (#7857)

This commit is contained in:
Selis
2024-04-05 07:44:20 +02:00
committed by GitHub
parent c542e3bac0
commit e1a987c25c
235 changed files with 3294 additions and 989 deletions
+4 -4
View File
@@ -5,21 +5,21 @@
return ..()
//Guest Checking
if(!config.guests_allowed && IsGuestKey(key))
if(!CONFIG_GET(flag/guests_allowed) && IsGuestKey(key)) // CHOMPEdit
log_adminwarn("Failed Login: [key] - Guests not allowed")
message_admins(span_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))
if(config && CONFIG_GET(flag/ToRban) && ToRban_isbanned(address)) // CHOMPEdit
log_adminwarn("Failed Login: [src] - Banned: ToR")
message_admins(span_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]")
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_GET(string/banappeals)]") // CHOMPEdit
if(config.ban_legacy_system)
if(CONFIG_GET(flag/ban_legacy_system)) // CHOMPEdit
//Ban Checking
. = CheckBan( ckey(key), computer_id, address )