diff options
author | Ben Longbons <b.r.longbons@gmail.com> | 2014-06-26 20:59:20 -0700 |
---|---|---|
committer | Ben Longbons <b.r.longbons@gmail.com> | 2014-06-26 21:01:30 -0700 |
commit | f5fcb973cfad6221264a2a859f5236c3cef2c470 (patch) | |
tree | 5b60b86ec6cc717e65fab6c18b4dcca4580140b7 /src | |
parent | ec21450522e3c2124f3510eef5cfd88420483248 (diff) | |
download | tmwa-f5fcb973cfad6221264a2a859f5236c3cef2c470.tar.gz tmwa-f5fcb973cfad6221264a2a859f5236c3cef2c470.tar.bz2 tmwa-f5fcb973cfad6221264a2a859f5236c3cef2c470.tar.xz tmwa-f5fcb973cfad6221264a2a859f5236c3cef2c470.zip |
Everybody gets a date
Diffstat (limited to 'src')
-rw-r--r-- | src/login/login.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
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<timestamp_milliseconds_buffer>("-"_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<timestamp_milliseconds_buffer>("-"_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<AccountName>(fixed.account_name.to_print()); ma.passwd = stringish<AccountPass>(fixed.password.to_print()); - ma.lastlogin = stringish<timestamp_milliseconds_buffer>("-"_s); + stamp_time(ma.lastlogin); ma.sex = fixed.sex; Packet_Fixed<0x7931> fixed_31; |