From 0ca87419c28ebc750934786cde95c57ad840c548 Mon Sep 17 00:00:00 2001 From: piaip Date: Sun, 14 Jun 2009 04:11:39 +0000 Subject: * fix: money in cuser was not updated / sync to shm after sync_update... git-svn-id: http://opensvn.csie.org/pttbbs/trunk/pttbbs@4608 63ad8ddf-47c3-0310-b6dd-a9e9d9715204 --- mbbsd/passwd.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'mbbsd') diff --git a/mbbsd/passwd.c b/mbbsd/passwd.c index 1b55952a..d73b5dec 100644 --- a/mbbsd/passwd.c +++ b/mbbsd/passwd.c @@ -32,10 +32,12 @@ passwd_sync_update(int num, userec_t * buf) if (num < 1 || num > MAX_USERS) return -1; + // money update should be done before everything. + buf->money = moneyof(num); + if(usernum == num && currutmp && ((alerts = currutmp->alerts) & ALERT_PWD)) { userec_t u; - buf->money = moneyof(num); if (passwd_sync_query(num, &u) != 0) return -1; -- cgit v1.2.3