summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorptt <ptt@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2004-11-27 01:52:39 +0800
committerptt <ptt@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2004-11-27 01:52:39 +0800
commit502032debd34e24e38a3c5f1959acc217119e1e4 (patch)
treee86c66042a092c33bcf4eb441dca2d5d7e9b1d29
parentfcda94368ef75154d2730b9c2c0bfbd451e05173 (diff)
downloadpttbbs-502032debd34e24e38a3c5f1959acc217119e1e4.tar
pttbbs-502032debd34e24e38a3c5f1959acc217119e1e4.tar.gz
pttbbs-502032debd34e24e38a3c5f1959acc217119e1e4.tar.bz2
pttbbs-502032debd34e24e38a3c5f1959acc217119e1e4.tar.lz
pttbbs-502032debd34e24e38a3c5f1959acc217119e1e4.tar.xz
pttbbs-502032debd34e24e38a3c5f1959acc217119e1e4.tar.zst
pttbbs-502032debd34e24e38a3c5f1959acc217119e1e4.zip
add description to invoice
git-svn-id: http://opensvn.csie.org/pttbbs/trunk/pttbbs@2355 63ad8ddf-47c3-0310-b6dd-a9e9d9715204
-rw-r--r--mbbsd/cal.c15
1 files changed, 10 insertions, 5 deletions
diff --git a/mbbsd/cal.c b/mbbsd/cal.c
index 87156d15..e5b65fac 100644
--- a/mbbsd/cal.c
+++ b/mbbsd/cal.c
@@ -63,11 +63,16 @@ vice(int money, char *item)
unsigned int viceserial = (currutmp->lastact % 10000) * 10000 + rand() % 10000;
demoney(-money);
- if(money<100) return 0;
- setuserfile(buf, VICE_NEW);
- log_file(buf, LOG_CREAT | LOG_VF, "%8.8d\n", viceserial);
- snprintf(buf, sizeof(buf),
- "%s 花了%d$ 編號[%08d]", item, money, viceserial);
+ if(money>=100)
+ {
+ setuserfile(buf, VICE_NEW);
+ log_file(buf, LOG_CREAT | LOG_VF, "%8.8d\n", viceserial);
+ snprintf(buf, sizeof(buf),
+ "%s 花了$%d 編號[%08d]", item, money, viceserial);
+ }
+ else
+ snprintf(buf, sizeof(buf),
+ "%s 花了$%d 編號[%08d] ($100以下 不能對獎", item, money, viceserial);
mail_id(cuser.userid, buf, "etc/vice.txt", "Ptt經濟部");
return 0;
}