From 83305fa7906211b30e9dc694b42645f67a2ec497 Mon Sep 17 00:00:00 2001 From: Alffd Date: Fri, 25 May 2018 16:35:48 -0400 Subject: [PATCH] Probably fine --- code/modules/mob/new_player/new_player.dm | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/code/modules/mob/new_player/new_player.dm b/code/modules/mob/new_player/new_player.dm index ccee8332c7c..6d1f856fbd3 100644 --- a/code/modules/mob/new_player/new_player.dm +++ b/code/modules/mob/new_player/new_player.dm @@ -20,26 +20,27 @@ /mob/new_player/verb/new_player_panel() set src = usr - if(tos_consent) + + if(handle_tos_consent()) new_player_panel_proc() - else - handle_tos_consent() /mob/new_player/proc/handle_tos_consent() if(!GLOB.join_tos) - return + return TRUE + establish_db_connection() if(!dbcon.IsConnected()) - tos_consent = 1 - return + tos_consent = TRUE + return TRUE + var/DBQuery/query = dbcon.NewQuery("SELECT * FROM [format_table_name("privacy")] WHERE ckey='[src.ckey]' AND consent=1") query.Execute() while(query.NextRow()) - tos_consent = 1 - - if(!tos_consent) - privacy_consent() + tos_consent = TRUE + return TRUE + privacy_consent() + return FALSE /mob/new_player/proc/privacy_consent() src << browse(null, "window=playersetup")