From 2df2e48d5ec19e332a9e13798a03c50077080cba Mon Sep 17 00:00:00 2001 From: piaip Date: Wed, 16 Sep 2009 02:05:54 +0000 Subject: * more logs for exmailbox git-svn-id: http://opensvn.csie.org/pttbbs/trunk/pttbbs@4844 63ad8ddf-47c3-0310-b6dd-a9e9d9715204 --- mbbsd/cal.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'mbbsd/cal.c') diff --git a/mbbsd/cal.c b/mbbsd/cal.c index c920aeb1..e4d1d492 100644 --- a/mbbsd/cal.c +++ b/mbbsd/cal.c @@ -129,7 +129,7 @@ int p_exmail(void) { char ans[4], buf[200]; - int n; + int n, oldm; if (cuser.exmailbox >= MAX_EXKEEPMAIL) { vmsgf("容量最多增加 %d 封,不能再買了。", MAX_EXKEEPMAIL); @@ -142,6 +142,7 @@ p_exmail(void) // and people usually come this this by accident... getdata(b_lines - 2, 0, buf, ans, sizeof(ans), NUMECHO); + oldm = cuser.exmailbox; n = atoi(ans); if (!ans[0] || n<=0) return 0; @@ -159,8 +160,13 @@ p_exmail(void) n, n*1000) != 'y') return 0; + reload_money(); vice(n * 1000, "購買信箱"); inmailbox(n); + log_filef("log/exmailbox.log", LOG_CREAT, + "%-13s %d+%d->%d %s\n", cuser.userid, + oldm, n, cuser.exmailbox, Cdatelite(&now)); + vmsgf("已購買信箱。新容量上限: %d", cuser.exmailbox); return 0; } -- cgit v1.2.3