diff --git a/code/modules/admin/IsBanned.dm b/code/modules/admin/IsBanned.dm index 6ee40c7dac1..10867f82978 100644 --- a/code/modules/admin/IsBanned.dm +++ b/code/modules/admin/IsBanned.dm @@ -32,6 +32,23 @@ if(GLOB.admin_datums[ckey] || GLOB.deadmins[ckey]) admin = TRUE + if(!real_bans_only && !admin && CONFIG_GET(flag/panic_bunker) && !CONFIG_GET(flag/panic_bunker_interview)) + var/datum/db_query/query_client_in_db = SSdbcore.NewQuery( + "SELECT 1 FROM [format_table_name("player")] WHERE ckey = :ckey", + list("ckey" = ckey) + ) + if(!query_client_in_db.Execute()) + qdel(query_client_in_db) + return + + var/client_is_in_db = query_client_in_db.NextRow() + if(!client_is_in_db) + + var/reject_message = "Failed Login: [key] [address]-[computer_id] - New Account attempting to connect during panic bunker, but was rejected due to no prior connections to game servers (no database entry)" + log_access(reject_message) + if (message) + message_admins(span_adminnotice("[reject_message]")) + return list("reason"="panicbunker", "desc" = "Sorry but the server is currently not accepting connections from never before seen players") //Whitelist if(!real_bans_only && !C && CONFIG_GET(flag/usewhitelist))