diff options
author | piaip <piaip@63ad8ddf-47c3-0310-b6dd-a9e9d9715204> | 2005-08-06 00:54:29 +0800 |
---|---|---|
committer | piaip <piaip@63ad8ddf-47c3-0310-b6dd-a9e9d9715204> | 2005-08-06 00:54:29 +0800 |
commit | 8d9c25ecd715a6c62755e4dd036c15fb601c975c (patch) | |
tree | b8c1a1ecb3ccb366b6286cff0a9380fc4787bc71 /mbbsd | |
parent | 07b0628a5700b1d3bb5281b64fa9d5ac7073ed87 (diff) | |
download | pttbbs-8d9c25ecd715a6c62755e4dd036c15fb601c975c.tar pttbbs-8d9c25ecd715a6c62755e4dd036c15fb601c975c.tar.gz pttbbs-8d9c25ecd715a6c62755e4dd036c15fb601c975c.tar.bz2 pttbbs-8d9c25ecd715a6c62755e4dd036c15fb601c975c.tar.lz pttbbs-8d9c25ecd715a6c62755e4dd036c15fb601c975c.tar.xz pttbbs-8d9c25ecd715a6c62755e4dd036c15fb601c975c.tar.zst pttbbs-8d9c25ecd715a6c62755e4dd036c15fb601c975c.zip |
various money related fix
git-svn-id: http://opensvn.csie.org/pttbbs/trunk/pttbbs@2993 63ad8ddf-47c3-0310-b6dd-a9e9d9715204
Diffstat (limited to 'mbbsd')
-rw-r--r-- | mbbsd/admin.c | 2 | ||||
-rw-r--r-- | mbbsd/bbs.c | 22 | ||||
-rw-r--r-- | mbbsd/cal.c | 4 | ||||
-rw-r--r-- | mbbsd/record.c | 2 | ||||
-rw-r--r-- | mbbsd/talk.c | 3 |
5 files changed, 17 insertions, 16 deletions
diff --git a/mbbsd/admin.c b/mbbsd/admin.c index f6aaff54..1cb37787 100644 --- a/mbbsd/admin.c +++ b/mbbsd/admin.c @@ -1373,7 +1373,7 @@ give_money(void) int to_all = 0, money = 0; int total_money=0, count=0; - getdata(0, 0, "指定使用者(S) 全站使用者(A) 取消(Q)?[S]", buf, sizeof(buf), LCECHO); + getdata(0, 0, "指定使用者(S) 全站使用者(A) 取消(Q)?[S]", buf, 3, LCECHO); if (buf[0] == 'q') return 1; else if (buf[0] == 'a') { diff --git a/mbbsd/bbs.c b/mbbsd/bbs.c index 2a653505..03afeb50 100644 --- a/mbbsd/bbs.c +++ b/mbbsd/bbs.c @@ -2291,7 +2291,7 @@ view_postmoney(int ent, const fileheader_t * fhdr, const char *direct) int num = 0, money=0; if(fhdr->filemode & FILE_BOTTOM) - /* donothing because substitute_ref_record forgot to update multi.money */ + /* donothing because substitute_ref_record forgot to update multi.money */ vmsg("置底的文章很重要,記得看就好了,別理它的價格"); else if(fhdr->filemode & FILE_ANONYMOUS) /* When the file is anonymous posted, fhdr->multi.anon_uid is author. @@ -2308,18 +2308,16 @@ view_postmoney(int ent, const fileheader_t * fhdr, const char *direct) else money = fhdr->multi.money; - vmsg("這一篇文章值 %d 銀", money); + if (vmsg("這一篇文章值 %d 銀", fhdr->multi.money) == 'Q') + { + /* QQ: enable money listing mode */ + currlistmode = (currlistmode == LISTMODE_MONEY) ? + LISTMODE_DATE : LISTMODE_MONEY; + + vmsg((currlistmode == LISTMODE_MONEY) ? + "開啟文章價格列表模式" : "停止列出文章價格"); + } -#ifdef WHATISIT - if (vmsg("這一篇文章值 %d 銀", fhdr->multi.money) == 'Q') - { - /* enable money listing mode */ - currlistmode = (currlistmode == LISTMODE_MONEY) ? - LISTMODE_DATE : LISTMODE_MONEY; - vmsg((currlistmode == LISTMODE_MONEY) ? - "[測試中功\能] 開啟文章價格列表模式" : "停止列出文章價格"); - } -#endif return FULLUPDATE; } diff --git a/mbbsd/cal.c b/mbbsd/cal.c index 26cce228..013746d5 100644 --- a/mbbsd/cal.c +++ b/mbbsd/cal.c @@ -417,8 +417,8 @@ p_give(void) return 0; /* 繳完稅就沒錢給了 */ deumoney(searchuser(id, id), money - tax); // TODO if searchuser(id) return 0 demoney(-money); - log_file(FN_MONEY, LOG_CREAT | LOG_VF, "%s\t給%s\t%d\t%s", - cuser.userid, id, money - tax, ctime4(&now)); + log_file(FN_MONEY, LOG_CREAT | LOG_VF, "%s\t給%s\t%d\t(稅後 %d)\t%s", + cuser.userid, id, money, money - tax, ctime4(&now)); #ifdef PLAY_ANGEL getuser(id, &xuser); if (!strcmp(xuser.myangel, cuser.userid)){ diff --git a/mbbsd/record.c b/mbbsd/record.c index 0ea79f80..439b47f4 100644 --- a/mbbsd/record.c +++ b/mbbsd/record.c @@ -193,9 +193,11 @@ getindex(const char *direct, fileheader_t *fhdr, int end) } else{ /* 上面的 binary search 爛掉了, 那就改用 linear search */ +#ifndef _BBS_UTIL_C_ log_file("getindexerror", LOG_CREAT | LOG_VF, "%s try to find: %d final i:%d\n", direct, stamp, i); +#endif // Ptt: log if there is still forever loop. end = get_num_records(direct, sizeof(fileheader_t)); diff --git a/mbbsd/talk.c b/mbbsd/talk.c index 322ab5cc..7b0e2e14 100644 --- a/mbbsd/talk.c +++ b/mbbsd/talk.c @@ -2638,8 +2638,9 @@ userlist(void) } else { deumoney(uentp->uid, ch - give_tax(ch)); log_file(FN_MONEY, LOG_CREAT | LOG_VF, - "%s\t給%s\t%d\t%s\n", cuser.userid, + "%s\t給%s\t%d\t(稅後 %d)\t%s\n", cuser.userid, uentp->userid, ch, + ch-give_tax(ch), ctime4(&currutmp->lastact)); mail_redenvelop(cuser.userid, uentp->userid, ch - give_tax(ch), 'Y'); |