diff --git a/code/modules/admin/admin.dm b/code/modules/admin/admin.dm
index 9f51c43030..7196319568 100644
--- a/code/modules/admin/admin.dm
+++ b/code/modules/admin/admin.dm
@@ -38,7 +38,7 @@
body += " \[Heal\] "
if(M.client)
- body += "
\[Player Age: [M.client.player_age]\]\[Byond Age: [M.client.account_age]\]"
+ body += "
\[First Seen: [M.client.player_join_date]\]\[Byond account registered on: [M.client.account_join_date]\]"
diff --git a/code/modules/client/client_defines.dm b/code/modules/client/client_defines.dm
index f4500a700a..221043bd8a 100644
--- a/code/modules/client/client_defines.dm
+++ b/code/modules/client/client_defines.dm
@@ -39,11 +39,12 @@
////////////////////////////////////
//things that require the database//
////////////////////////////////////
- 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
+ var/player_age = -1 //Used to determine how old the account is - in days.
+ var/player_join_date = null //Date that this account was first seen in the server
+ 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
@@ -64,4 +65,4 @@
var/connection_timeofday //world.timeofday they connected
var/inprefs = FALSE
- var/list/topiclimiter
+ var/list/topiclimiter
diff --git a/code/modules/client/client_procs.dm b/code/modules/client/client_procs.dm
index a7bf9e5a25..1414c86cd9 100644
--- a/code/modules/client/client_procs.dm
+++ b/code/modules/client/client_procs.dm
@@ -319,11 +319,9 @@ GLOBAL_LIST(external_rsc_urls)
if(config.use_account_age_for_jobs && account_age >= 0)
player_age = account_age
if(account_age >= 0 && account_age < config.notify_new_player_account_age)
- message_admins("[key_name_admin(src)] (IP: [address], ID: [computer_id]) is a new BYOND account [account_age] day[(account_age==1?"":"s")] old, created on [account_join_date].")
+ message_admins("[key_name_admin(src)] (IP: [address], ID: [computer_id]) is a new BYOND account day[(account_age==1?"":"s")] old, created on [account_join_date].")
if (config.irc_first_connection_alert)
- send2irc_adminless_only("new_byond_user", "[key_name(src)] (IP: [address], ID: [computer_id]) is a new BYOND account [account_age] day[(account_age==1?"":"s")] old, created on [account_join_date].")
- else //We failed to get an age for this user, let admins know they need to keep an eye on them
- message_admins("Failed to get BYOND account age for [key_name_admin(src)]")
+ send2irc_adminless_only("new_byond_user", "[key_name(src)] (IP: [address], ID: [computer_id]) is a new BYOND account day[(account_age==1?"":"s")] old, created on [account_join_date].")
get_message_output("watchlist entry", ckey)
check_ip_intel()
@@ -464,20 +462,21 @@ GLOBAL_LIST(external_rsc_urls)
if(!query_client_in_db.NextRow())
new_player = 1
account_join_date = sanitizeSQL(findJoinDate())
- var/datum/DBQuery/query_add_player = SSdbcore.NewQuery("INSERT INTO [format_table_name("player")] (`ckey`, `firstseen`, `lastseen`, `ip`, `computerid`, `lastadminrank`, `accountjoindate`) VALUES ('[sql_ckey]', Now(), Now(), INET_ATON('[sql_ip]'), '[sql_computerid]', '[sql_admin_rank]', [account_join_date ? "'[account_join_date]'" : "NULL"])")
+ var/datum/DBQuery/query_add_player = SSdbcore.NewQuery("INSERT INTO [format_table_name("player")] VALUES ('[sql_ckey]', Now(), Now(), INET_ATON('[sql_ip]'), '[sql_computerid]', '[sql_admin_rank]', [account_join_date ? "'[account_join_date]'" : "NULL"])")
if(!query_add_player.Execute())
return
if(!account_join_date)
account_join_date = "Error"
account_age = -1
- var/datum/DBQuery/query_get_client_age = SSdbcore.NewQuery("SELECT DATEDIFF(Now(),firstseen), accountjoindate, DATEDIFF(Now(),accountjoindate) FROM [format_table_name("player")] WHERE ckey = '[sql_ckey]'")
+ var/datum/DBQuery/query_get_client_age = SSdbcore.NewQuery("SELECT firstseen, DATEDIFF(Now(),firstseen), accountjoindate, DATEDIFF(Now(),accountjoindate) FROM [format_table_name("player")] WHERE ckey = '[sql_ckey]'")
if(!query_get_client_age.Execute())
return
if(query_get_client_age.NextRow())
- player_age = text2num(query_get_client_age.item[1])
+ player_join_date = query_get_client_age.item[1]
+ player_age = text2num(query_get_client_age.item[2])
if(!account_join_date)
- account_join_date = query_get_client_age.item[2]
- account_age = text2num(query_get_client_age.item[3])
+ account_join_date = query_get_client_age.item[3]
+ account_age = text2num(query_get_client_age.item[4])
if(!account_age)
account_join_date = sanitizeSQL(findJoinDate())
if(!account_join_date)