diff --git a/code/modules/mob/new_player/login.dm b/code/modules/mob/new_player/login.dm index 7561c463710..be8439952f4 100644 --- a/code/modules/mob/new_player/login.dm +++ b/code/modules/mob/new_player/login.dm @@ -41,6 +41,7 @@ spawn(10) if(client) + handle_privacy_poll() new_player_panel() //PDA Resource Initialisation =======================================================> /* diff --git a/code/modules/mob/new_player/new_player.dm b/code/modules/mob/new_player/new_player.dm index e0b1cd10869..a31d1fb59a4 100644 --- a/code/modules/mob/new_player/new_player.dm +++ b/code/modules/mob/new_player/new_player.dm @@ -45,6 +45,59 @@ src << browse(output,"window=playersetup;size=250x210;can_close=0") return + proc/handle_privacy_poll() + var/user = sqlfdbklogin + var/pass = sqlfdbkpass + var/db = sqlfdbkdb + var/address = sqladdress + var/port = sqlport + + var/DBConnection/dbcon = new() + + dbcon.Connect("dbi:mysql:[db]:[address]:[port]","[user]","[pass]") + if(!dbcon.IsConnected()) + return + var/voted = 0 + + var/DBQuery/query = dbcon.NewQuery("SELECT * FROM erro_privacy WHERE ckey='[src.ckey]'") + query.Execute() + while(query.NextRow()) + voted = 1 + break + + if(!voted) + privacy_poll() + + dbcon.Disconnect() + + proc/privacy_poll() + var/output = "
Signed stats gathering"
+ output += "
Pick this option if you think usernames should be logged with stats. This allows us to have personalized stats as well as polls."
+
+ output += "
Anonymous stats gathering"
+ output += "
Pick this option if you think only hashed (indecipherable) usernames should be logged with stats. This doesn't allow us to have personalized stats, as we can't tell who is who (hashed values aren't readable), we can however have ingame polls."
+
+ output += "
No stats gathering"
+ output += "
Pick this option if you don't want player-specific stats gathered. This does not allow us to have player-specific stats or polls."
+
+ output += "
Ask again later"
+ output += "
This poll will be brought up again next round."
+
+ output += "
Don't ask again"
+ output += "
Only pick this if you are fine with whatever option wins."
+
+ output += "