Merge remote-tracking branch 'upstream/dev-freeze' into dev

Conflicts:
	code/game/objects/items/stacks/tiles/plasteel.dm
	code/game/objects/items/stacks/tiles/tile_types.dm
	code/modules/materials/materials.dm
	code/modules/mob/living/carbon/human/life.dm
	code/modules/mob/living/silicon/pai/pai.dm
	code/modules/surgery/implant.dm
	code/setup.dm
This commit is contained in:
PsiOmega
2015-06-26 20:28:47 +02:00
41 changed files with 290 additions and 149 deletions

View File

@@ -178,6 +178,25 @@
return ..()
// here because it's similar to below
// Returns null if no DB connection can be established, or -1 if the requested key was not found in the database
/proc/get_player_age(key)
establish_db_connection()
if(!dbcon.IsConnected())
return null
var/sql_ckey = sql_sanitize_text(ckey(key))
var/DBQuery/query = dbcon.NewQuery("SELECT datediff(Now(),firstseen) as age FROM erro_player WHERE ckey = '[sql_ckey]'")
query.Execute()
if(query.NextRow())
return text2num(query.item[1])
else
return -1
/client/proc/log_client_to_db()