diff options
author | ptt <ptt@63ad8ddf-47c3-0310-b6dd-a9e9d9715204> | 2004-04-06 04:32:52 +0800 |
---|---|---|
committer | ptt <ptt@63ad8ddf-47c3-0310-b6dd-a9e9d9715204> | 2004-04-06 04:32:52 +0800 |
commit | 2d49c43abc05fc453ff3ff154fbe3a8dfd1fb571 (patch) | |
tree | c543fe6446c7acaf1781d93d5d9010fd2bcef3a5 /mbbsd/cache.c | |
parent | 9b691d3d21047d1121ab62994e124385359bbdaa (diff) | |
download | pttbbs-2d49c43abc05fc453ff3ff154fbe3a8dfd1fb571.tar pttbbs-2d49c43abc05fc453ff3ff154fbe3a8dfd1fb571.tar.gz pttbbs-2d49c43abc05fc453ff3ff154fbe3a8dfd1fb571.tar.bz2 pttbbs-2d49c43abc05fc453ff3ff154fbe3a8dfd1fb571.tar.lz pttbbs-2d49c43abc05fc453ff3ff154fbe3a8dfd1fb571.tar.xz pttbbs-2d49c43abc05fc453ff3ff154fbe3a8dfd1fb571.tar.zst pttbbs-2d49c43abc05fc453ff3ff154fbe3a8dfd1fb571.zip |
add push_bottom function
git-svn-id: http://opensvn.csie.org/pttbbs/trunk/pttbbs@1698 63ad8ddf-47c3-0310-b6dd-a9e9d9715204
Diffstat (limited to 'mbbsd/cache.c')
-rw-r--r-- | mbbsd/cache.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/mbbsd/cache.c b/mbbsd/cache.c index 67a405d3..21319c8e 100644 --- a/mbbsd/cache.c +++ b/mbbsd/cache.c @@ -460,7 +460,7 @@ setumoney(int uid, int money) int deumoney(int uid, int money) { - if (money < 0 && SHM->money[uid - 1] < -money) + if (money < 0 && moneyof(uid) < -money) return setumoney(uid, 0); else return setumoney(uid, SHM->money[uid - 1] + money); @@ -475,6 +475,10 @@ demoney(int money) int moneyof(int uid) { /* ptt 改進金錢處理效率 */ + if(SHM->money[uid - 1] == -1) + { + SHM->money[uid - 1] = passwd_query_money(uid); + } return SHM->money[uid - 1]; } |