Player byond account age stored in db (#26425)

set_client_age_from_db() and sync_client_with_db() have been merged. 
New clients are now added to the user table in a separate query than the one used to update their details upon connection; their player and account age is then calculated with DATEDIFF.
The code and regex used in findJoinDate() was changed a bit.
This commit is contained in:
Jordie
2017-05-04 20:13:35 -03:00
committed by Leo
parent 1c4efeb87a
commit a823a1b698
9 changed files with 93 additions and 100 deletions
+4 -2
View File
@@ -39,9 +39,11 @@
////////////////////////////////////
//things that require the database//
////////////////////////////////////
var/player_age = "Requires database" //So admins know why it isn't working - Used to determine how old the account is - in days.
var/player_age = -1 //Used to determine how old the account is - in days.
var/related_accounts_ip = "Requires database" //So admins know why it isn't working - Used to determine what other accounts previously logged in from this ip
var/related_accounts_cid = "Requires database" //So admins know why it isn't working - Used to determine what other accounts previously logged in from this computer id
var/account_join_date = null //Date of byond account creation in ISO 8601 format
var/account_age = -1 //Age of byond account in days
preload_rsc = PRELOAD_RSC
@@ -62,4 +64,4 @@
var/connection_timeofday //world.timeofday they connected
var/inprefs = FALSE
var/list/topiclimiter
var/list/topiclimiter