mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-07-18 10:33:30 +01:00
Fixes
- Makes it so that log_client_to_db is called before mob/Login() - Makes it so can_vote() doesn't runtime if the player_age isn't a number
This commit is contained in:
@@ -389,7 +389,6 @@
|
||||
prefs.last_ip = address //these are gonna be used for banning
|
||||
prefs.last_id = computer_id //these are gonna be used for banning
|
||||
|
||||
. = ..() //calls mob.Login()
|
||||
spawn() // Goonchat does some non-instant checks in start()
|
||||
chatOutput.start()
|
||||
|
||||
@@ -416,6 +415,8 @@
|
||||
winset(src, null, "command=\".configure graphics-hwmode on\"")
|
||||
|
||||
log_client_to_db(tdata)
|
||||
|
||||
. = ..() //calls mob.Login()
|
||||
|
||||
if(ckey in clientmessages)
|
||||
for(var/message in clientmessages[ckey])
|
||||
@@ -487,7 +488,7 @@
|
||||
var/DBQuery/query = dbcon.NewQuery("SELECT id, datediff(Now(),firstseen) as age FROM [format_table_name("player")] WHERE ckey = '[ckey]'")
|
||||
query.Execute()
|
||||
var/sql_id = 0
|
||||
player_age = 0 // New players won't have an entry so knowing we have a connection we set this to zero to be updated if their is a record.
|
||||
player_age = 0 // New players won't have an entry so knowing we have a connection we set this to zero to be updated if there is a record.
|
||||
while(query.NextRow())
|
||||
sql_id = query.item[1]
|
||||
player_age = text2num(query.item[2])
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
handle_player_polling()
|
||||
|
||||
/client/proc/can_vote()
|
||||
return player_age >= 30
|
||||
return istext(player_age) || player_age >= 30
|
||||
|
||||
/client/proc/handle_player_polling()
|
||||
establish_db_connection()
|
||||
|
||||
Reference in New Issue
Block a user