summaryrefslogtreecommitdiffstats
path: root/mbbsd
diff options
context:
space:
mode:
authorvictor <victor@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2003-12-01 12:41:01 +0800
committervictor <victor@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2003-12-01 12:41:01 +0800
commitb50ccfc1d4bab8bdc998f0bcadae66b73a1603a8 (patch)
tree7b22e54779567e6edd3f67d998c99821aa976f3f /mbbsd
parent9e5acf2b2b13eea84df06c2e3dad581f18eaca20 (diff)
downloadpttbbs-b50ccfc1d4bab8bdc998f0bcadae66b73a1603a8.tar
pttbbs-b50ccfc1d4bab8bdc998f0bcadae66b73a1603a8.tar.gz
pttbbs-b50ccfc1d4bab8bdc998f0bcadae66b73a1603a8.tar.bz2
pttbbs-b50ccfc1d4bab8bdc998f0bcadae66b73a1603a8.tar.lz
pttbbs-b50ccfc1d4bab8bdc998f0bcadae66b73a1603a8.tar.xz
pttbbs-b50ccfc1d4bab8bdc998f0bcadae66b73a1603a8.tar.zst
pttbbs-b50ccfc1d4bab8bdc998f0bcadae66b73a1603a8.zip
fix assess, it may be rewriten
git-svn-id: http://opensvn.csie.org/pttbbs/trunk/pttbbs@1385 63ad8ddf-47c3-0310-b6dd-a9e9d9715204
Diffstat (limited to 'mbbsd')
-rw-r--r--mbbsd/assess.c4
-rw-r--r--mbbsd/mbbsd.c10
2 files changed, 14 insertions, 0 deletions
diff --git a/mbbsd/assess.c b/mbbsd/assess.c
index 957d3042..95426e26 100644
--- a/mbbsd/assess.c
+++ b/mbbsd/assess.c
@@ -17,6 +17,7 @@ int inc_goodpost(int uid, int num)
{
passwd_query(uid, &xuser);
inc(&xuser.goodpost, num);
+ SHM->uinfo[uid - 1].goodpost = xuser.goodpost;
passwd_update(uid, &xuser);
return xuser.goodpost;
}
@@ -25,6 +26,7 @@ int inc_badpost(int uid, int num)
{
passwd_query(uid, &xuser);
inc(&xuser.badpost, num);
+ SHM->uinfo[uid - 1].badpost = xuser.badpost;
passwd_update(uid, &xuser);
return xuser.badpost;
}
@@ -33,6 +35,7 @@ int inc_goodsale(int uid, int num)
{
passwd_query(uid, &xuser);
inc(&xuser.goodsale, num);
+ SHM->uinfo[uid - 1].goodsale = xuser.goodsale;
passwd_update(uid, &xuser);
return xuser.goodsale;
}
@@ -41,6 +44,7 @@ int inc_badsale(int uid, int num)
{
passwd_query(uid, &xuser);
inc(&xuser.badsale, num);
+ SHM->uinfo[uid - 1].badsale = xuser.badsale;
passwd_update(uid, &xuser);
return xuser.badsale;
}
diff --git a/mbbsd/mbbsd.c b/mbbsd/mbbsd.c
index edd2f36d..a985c2bf 100644
--- a/mbbsd/mbbsd.c
+++ b/mbbsd/mbbsd.c
@@ -150,6 +150,11 @@ u_exit(char *mode)
setflags(CLOAK_FLAG, currutmp->invisible);
save_brdbuf();
+ cuser.goodpost = currutmp->goodpost;
+ cuser.badpost = currutmp->badpost;
+ cuser.goodsale = currutmp->goodsale;
+ cuser.badsale = currutmp->badsale;
+
cuser.invisible = currutmp->invisible;
cuser.pager = currutmp->pager;
memcpy(cuser.mind, currutmp->mind, 4);
@@ -722,6 +727,11 @@ setup_utmp(int mode)
uinfo.mode = currstat = mode;
uinfo.mailalert = load_mailalert(cuser.userid);
+ uinfo.goodpost = cuser.goodpost;
+ uinfo.badpost = cuser.badpost;
+ uinfo.goodsale = cuser.goodsale;
+ uinfo.badsale = cuser.badsale;
+
uinfo.userlevel = cuser.userlevel;
uinfo.sex = cuser.sex % 8;
uinfo.lastact = time(NULL);