From f5fcb973cfad6221264a2a859f5236c3cef2c470 Mon Sep 17 00:00:00 2001 From: Ben Longbons Date: Thu, 26 Jun 2014 20:59:20 -0700 Subject: Everybody gets a date --- src/login/login.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/login/login.cpp b/src/login/login.cpp index 4322b33..be38b04 100644 --- a/src/login/login.cpp +++ b/src/login/login.cpp @@ -514,6 +514,8 @@ bool extract(XString line, AuthData *ad) &ad->ban_until_time, vrec<' '>(&vars)))) return false; + if (ad->lastlogin == stringish("-"_s)) + stamp_time(ad->lastlogin); ad->last_ip = IP4Address(); if (ip != "-"_s && !extract(ip, &ad->last_ip)) return false; @@ -777,7 +779,7 @@ AccountId mmo_auth_new(struct mmo_account *account, SEX sex, AccountEmail email) ad.userid = account->userid; ad.pass = MD5_saltcrypt(account->passwd, make_salt()); - ad.lastlogin = stringish("-"_s); + stamp_time(ad.lastlogin); ad.sex = sex; ad.logincount = 0; ad.state = 0; @@ -1774,7 +1776,7 @@ void parse_admin(Session *s) // TODO make this a 'return false' bit of the network_to_native ma.userid = stringish(fixed.account_name.to_print()); ma.passwd = stringish(fixed.password.to_print()); - ma.lastlogin = stringish("-"_s); + stamp_time(ma.lastlogin); ma.sex = fixed.sex; Packet_Fixed<0x7931> fixed_31; -- cgit v1.2.3-60-g2f50