summaryrefslogtreecommitdiffstats
path: root/mbbsd
diff options
context:
space:
mode:
authorptt <ptt@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2004-04-30 12:33:05 +0800
committerptt <ptt@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2004-04-30 12:33:05 +0800
commitce78e68d0cfbf79502bb7c60cbea405066546b24 (patch)
tree2f611f51f14dc2f8940b77b1a577f3f321a6f97f /mbbsd
parentfa58d071ff9032f6efa7316e724d6c49f78b7abe (diff)
downloadpttbbs-ce78e68d0cfbf79502bb7c60cbea405066546b24.tar
pttbbs-ce78e68d0cfbf79502bb7c60cbea405066546b24.tar.gz
pttbbs-ce78e68d0cfbf79502bb7c60cbea405066546b24.tar.bz2
pttbbs-ce78e68d0cfbf79502bb7c60cbea405066546b24.tar.lz
pttbbs-ce78e68d0cfbf79502bb7c60cbea405066546b24.tar.xz
pttbbs-ce78e68d0cfbf79502bb7c60cbea405066546b24.tar.zst
pttbbs-ce78e68d0cfbf79502bb7c60cbea405066546b24.zip
chang format of log_file
git-svn-id: http://opensvn.csie.org/pttbbs/trunk/pttbbs@1898 63ad8ddf-47c3-0310-b6dd-a9e9d9715204
Diffstat (limited to 'mbbsd')
-rw-r--r--mbbsd/cache.c2
-rw-r--r--mbbsd/talk.c20
2 files changed, 11 insertions, 11 deletions
diff --git a/mbbsd/cache.c b/mbbsd/cache.c
index f77bd2a7..a1088160 100644
--- a/mbbsd/cache.c
+++ b/mbbsd/cache.c
@@ -624,7 +624,9 @@ setbottomtotal(int bid)
n = get_num_records(genbuf, sizeof(fileheader_t));
if(n>5)
{
+#ifdef DEBUG_BOTTOM
log_file("fix_bottom", 1, "%s n:%d\n", genbuf, n);
+#endif
unlink(genbuf);
SHM->n_bottom[bid-1]=0;
}
diff --git a/mbbsd/talk.c b/mbbsd/talk.c
index d7550ba3..86a9e44a 100644
--- a/mbbsd/talk.c
+++ b/mbbsd/talk.c
@@ -2296,7 +2296,7 @@ userlist(void)
case 'g':
if (HAS_PERM(PERM_LOGINOK) &&
strcmp(uentp->userid, cuser.userid) != 0) {
- char genbuf[128];
+ char genbuf[10];
move(b_lines - 2, 0);
prints("要給 %s 多少錢呢? ", uentp->userid);
if (getdata(b_lines - 1, 0, "[銀行轉帳]: ",
@@ -2306,8 +2306,8 @@ userlist(void)
redrawall = redraw = 1;
break;
}
- sprintf(genbuf, "確定要給 %s %d Ptt 幣嗎? [N/y]", uentp->userid, ch);
- if (getans(genbuf) != 'y'){
+ if (getans("確定要給 %s %d Ptt 幣嗎? [N/y]",
+ uentp->userid, ch) != 'y'){
redrawall = redraw = 1;
break;
}
@@ -2317,19 +2317,17 @@ userlist(void)
outs("\033[41m 現金不足~~\033[m");
} else {
deumoney(uentp->uid, ch - give_tax(ch));
- prints("\033[44m 嗯..還剩下 %d 錢.."
- "\033[m", demoney(-ch));
- snprintf(genbuf, sizeof(genbuf),
- "%s\t給%s\t%d\t%s\n", cuser.userid,
- uentp->userid, ch,
- ctime(&currutmp->lastact));
- log_file(FN_MONEY, genbuf, 1);
+ log_file(FN_MONEY, 1,
+ "%s\t給%s\t%d\t%s\n", cuser.userid,
+ uentp->userid, ch, ctime(&currutmp->lastact));
mail_redenvelop(cuser.userid, uentp->userid,
ch - give_tax(ch), 'Y');
+ vmsg("\033[44m 嗯..還剩下 %d 錢.."
+ "\033[m", demoney(-ch));
}
} else {
clrtoeol();
- outs("\033[41m 交易取消! \033[m");
+ vmsg("\033[41m 交易取消! \033[m");
}
redrawall = redraw = 1;
}