summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--mbbsd/bbs.c9
-rw-r--r--sample/crontab3
-rw-r--r--sample/pttbbs.conf3
3 files changed, 15 insertions, 0 deletions
diff --git a/mbbsd/bbs.c b/mbbsd/bbs.c
index 0b11fe81..a7160a0c 100644
--- a/mbbsd/bbs.c
+++ b/mbbsd/bbs.c
@@ -964,6 +964,15 @@ do_general(int isbid)
else
{
rename(genbuf, fpath);
+#ifdef LOGPOST
+ {
+ FILE *fp = fopen("log/post", "a");
+ fprintf(fp, "%d %s boards/%c/%s/%s\n",
+ now, cuser.userid, currboard[0], currboard,
+ postfile.filename);
+ fclose(fp);
+ }
+#endif
setbtotal(currbid);
if( currmode & MODE_SELECT )
diff --git a/sample/crontab b/sample/crontab
index 3734c470..a732f926 100644
--- a/sample/crontab
+++ b/sample/crontab
@@ -115,3 +115,6 @@
20 21 * * * bin/shmctl utmpfix -t 3600
30,40,50 21 * * * bin/shmctl utmpfix -t 1800
*/20 22,23,0,1 * * * bin/shmctl utmpfix -t 1200
+
+# 如果開啟 LOGPOST 的話需順便開這個, 每天 rotate log
+#0 6 * * * /bin/mv log/post log/post.old
diff --git a/sample/pttbbs.conf b/sample/pttbbs.conf
index 9263f386..6541dbd1 100644
--- a/sample/pttbbs.conf
+++ b/sample/pttbbs.conf
@@ -227,6 +227,9 @@
/* 若定義, 則不允許註冊 guest */
//#define NO_GUEST_ACCOUNT_REG
+/* 若定義, 則每篇發文會寫到 log/post , 可以給分析或張爸魔一類的程式用 */
+//#define LOGPOST
+
/* 前進站畫面 */
#define INSCREEN \
"前進站畫面 (請至 pttbbs.conf 修改您的前進站畫面)"