Skip to content

Commit

Permalink
Fixes some undeleted sql queries (#231)
Browse files Browse the repository at this point in the history
  • Loading branch information
vinylspiders authored and Iajret committed Jan 3, 2024
1 parent 39d3006 commit a08518e
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
2 changes: 1 addition & 1 deletion code/modules/client/client_procs.dm
Original file line number Diff line number Diff line change
Expand Up @@ -683,6 +683,7 @@ GLOBAL_LIST_INIT(blacklisted_builds, list(
if(!client_is_in_db)
//NOVA EDIT ADDITION BEGIN - PANICBUNKER
if (CONFIG_GET(flag/panic_bunker) && !holder && !GLOB.deadmins[ckey] && !(ckey in GLOB.bunker_passthrough))
qdel(query_client_in_db)
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_immediate(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
Expand All @@ -693,7 +694,6 @@ GLOBAL_LIST_INIT(blacklisted_builds, list(
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
//NOVA EDIT END
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -222,9 +222,11 @@ SUBSYSTEM_DEF(player_ranks)
)

if(!query_load_player_rank.warn_execute())
qdel(query_load_player_rank)
return

rank_controller.load_from_query(query_load_player_rank)
qdel(query_load_player_rank)


/// Allows fetching the appropriate player_rank_controller based on its
Expand Down Expand Up @@ -333,9 +335,11 @@ SUBSYSTEM_DEF(player_ranks)
)

if(!query_add_player_rank.warn_execute())
qdel(query_add_player_rank)
return FALSE

controller.add_player(ckey)
qdel(query_add_player_rank)
return TRUE


Expand Down Expand Up @@ -412,9 +416,11 @@ SUBSYSTEM_DEF(player_ranks)
)

if(!query_remove_player_rank.warn_execute())
qdel(query_remove_player_rank)
return FALSE

controller.remove_player(ckey)
qdel(query_remove_player_rank)
return TRUE


Expand Down Expand Up @@ -468,12 +474,15 @@ SUBSYSTEM_DEF(player_ranks)
)

if(!query_get_existing_entries.warn_execute())
qdel(query_get_existing_entries)
return

while(query_get_existing_entries.NextRow())
var/ckey = ckey(query_get_existing_entries.item[INDEX_CKEY])
ckeys_to_migrate -= ckey

qdel(query_get_existing_entries)

var/list/rows_to_insert = list()

for(var/ckey in ckeys_to_migrate)
Expand Down

0 comments on commit a08518e

Please sign in to comment.