Old PB system [SEMI-MODULAR] (#1616)

* yes

* aaaaaa

* Update panicbunker.dm
This commit is contained in:
Gandalf
2020-11-21 17:25:36 +01:00
committed by GitHub
parent c5e4538eab
commit 907f14f244
6 changed files with 122 additions and 3 deletions
+22 -2
View File
@@ -534,7 +534,7 @@ GLOBAL_LIST_INIT(blacklisted_builds, list(
if(!query_client_in_db.Execute())
qdel(query_client_in_db)
return
/*
//If we aren't an admin, and the flag is set
if(CONFIG_GET(flag/panic_bunker) && !holder && !GLOB.deadmins[ckey])
var/living_recs = CONFIG_GET(number/panic_bunker_living)
@@ -557,8 +557,24 @@ GLOBAL_LIST_INIT(blacklisted_builds, list(
qdel(query_client_in_db)
qdel(src)
return
*/
if(!query_client_in_db.NextRow())
//SKYRAT EDIT ADDITION BEGIN - PANICBUNKER
if (CONFIG_GET(flag/panic_bunker) && !holder && !GLOB.deadmins[ckey] && !(ckey in GLOB.bunker_passthrough))
log_access("Failed Login: [key] - [address] - New account attempting to connect during panic bunker")
message_admins("<span class='adminnotice'>Failed Login: [key] - [address] - New account attempting to connect during panic bunker</span>")
to_chat(src, {"<span class='notice'>Hi! We have temporarily enabled safety measures that prevents new players from joining currently.<br>Please try again later, or contact a staff on Discord if you have any questions. <br> <br> To join our community, check out our Discord! To gain full access to our Discord, read the rules and post a request in the #access-requests channel under the \"Landing Zone\" category in the Discord server linked here: <a href='https://discord.gg/6RpdCgR'>https://discord.gg/6RpdCgR</a></span>"}) //skyrat-edit
var/list/connectiontopic_a = params2list(connectiontopic)
var/list/panic_addr = CONFIG_GET(string/panic_server_address)
if(panic_addr && !connectiontopic_a["redirect"])
var/panic_name = CONFIG_GET(string/panic_server_name)
to_chat(src, "<span class='notice'>Sending you to [panic_name ? panic_name : panic_addr].</span>")
winset(src, null, "command=.options")
src << link("[panic_addr]?redirect=1")
qdel(query_client_in_db)
qdel(src)
return
//SKYRAT EDIT END
new_player = 1
account_join_date = findJoinDate()
var/datum/db_query/query_add_player = SSdbcore.NewQuery({"
@@ -573,6 +589,10 @@ GLOBAL_LIST_INIT(blacklisted_builds, list(
if(!account_join_date)
account_join_date = "Error"
account_age = -1
//SKYRAT EDIT ADDITION BEGIN - PANICBUNKER
else if(ckey in GLOB.bunker_passthrough)
GLOB.bunker_passthrough -= ckey
//SKYRAT EDIT END
qdel(query_client_in_db)
var/datum/db_query/query_get_client_age = SSdbcore.NewQuery(
"SELECT firstseen, DATEDIFF(Now(),firstseen), accountjoindate, DATEDIFF(Now(),accountjoindate) FROM [format_table_name("player")] WHERE ckey = :ckey",