summaryrefslogtreecommitdiffstats
path: root/mbbsd/chicken.c
diff options
context:
space:
mode:
authorin2 <in2@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2004-05-03 23:19:01 +0800
committerin2 <in2@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2004-05-03 23:19:01 +0800
commit923905e83ad2d075f0d40125e8acbd0ca88ea938 (patch)
treebd8287047cf35c6c7e1e98057876d7be07e470a3 /mbbsd/chicken.c
parent79890093f845d2c70ffec2e0699700380e623cd8 (diff)
downloadpttbbs-923905e83ad2d075f0d40125e8acbd0ca88ea938.tar
pttbbs-923905e83ad2d075f0d40125e8acbd0ca88ea938.tar.gz
pttbbs-923905e83ad2d075f0d40125e8acbd0ca88ea938.tar.bz2
pttbbs-923905e83ad2d075f0d40125e8acbd0ca88ea938.tar.lz
pttbbs-923905e83ad2d075f0d40125e8acbd0ca88ea938.tar.xz
pttbbs-923905e83ad2d075f0d40125e8acbd0ca88ea938.tar.zst
pttbbs-923905e83ad2d075f0d40125e8acbd0ca88ea938.zip
in log_file(), use LOG_VF if need to vfprintf().
git-svn-id: http://opensvn.csie.org/pttbbs/trunk/pttbbs@1921 63ad8ddf-47c3-0310-b6dd-a9e9d9715204
Diffstat (limited to 'mbbsd/chicken.c')
-rw-r--r--mbbsd/chicken.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/mbbsd/chicken.c b/mbbsd/chicken.c
index 7af6a7b3..78bcf358 100644
--- a/mbbsd/chicken.c
+++ b/mbbsd/chicken.c
@@ -134,7 +134,7 @@ new_chicken()
getdata(8, 0, "幫牠取個好名字:", mychicken->name,
sizeof(mychicken->name), DOECHO);
- log_file(CHICKENLOG, 1,
+ log_file(CHICKENLOG, LOG_CREAT | LOG_VF,
"\033[31m%s \033[m養了一隻叫\033[33m %s \033[m的 "
"\033[32m%s\033[m 於 %s\n", cuser.userid,
mychicken->name, chicken_type[(int)mychicken->type], ctime(&now));
@@ -445,7 +445,7 @@ ch_kill()
vice(100, "棄養寵物費");
more(CHICKEN_PIC "/deadth", YEA);
- log_file(CHICKENLOG, 1,
+ log_file(CHICKENLOG, LOG_CREAT | LOG_VF,
"\033[31m%s \033[m把 \033[33m%s\033[m\033[32m %s "
"\033[m宰了 於 %s\n", cuser.userid, mychicken->name,
chicken_type[(int)mychicken->type], ctime(&now));
@@ -502,7 +502,8 @@ ch_sell()
ans = getans("這隻%d歲%s可以賣 %d 元, 是否要賣?(y/N)", age,
chicken_type[(int)mychicken->type], money);
if (ans == 'y') {
- log_file(CHICKENLOG, 1, "\033[31m%s\033[m 把 \033[33m%s\033[m "
+ log_file(CHICKENLOG, LOG_CREAT | LOG_VF,
+ "\033[31m%s\033[m 把 \033[33m%s\033[m "
"\033[32m%s\033[m 用 \033[36m%d\033[m 賣了 於 %s\n",
cuser.userid, mychicken->name,
chicken_type[(int)mychicken->type], money, ctime(&now));
@@ -658,7 +659,7 @@ deadtype(chicken_t * thechicken)
return 0;
if (thechicken == mychicken) {
- log_file(CHICKENLOG, 1,
+ log_file(CHICKENLOG, LOG_CREAT | LOG_VF,
"\033[31m%s\033[m 所疼愛的\033[33m %s\033[32m %s "
"\033[m掛了 於 %s\n", cuser.userid, thechicken->name,
chicken_type[(int)thechicken->type], ctime(&now));
@@ -715,7 +716,7 @@ ch_changename()
if (strlen(newname) >= 3 && strcmp(newname, mychicken->name)) {
strlcpy(mychicken->name, newname, sizeof(mychicken->name));
- log_file(CHICKENLOG, 1,
+ log_file(CHICKENLOG, LOG_CREAT | LOG_VF,
"\033[31m%s\033[m 把疼愛的\033[33m %s\033[32m %s "
"\033[m改名為\033[33m %s\033[m 於 %s\n",
cuser.userid, mychicken->name,