diff options
author | scw <scw@63ad8ddf-47c3-0310-b6dd-a9e9d9715204> | 2004-02-12 21:32:01 +0800 |
---|---|---|
committer | scw <scw@63ad8ddf-47c3-0310-b6dd-a9e9d9715204> | 2004-02-12 21:32:01 +0800 |
commit | fa574c1beb97aca4e50fddf40a9a435344d367b3 (patch) | |
tree | 666e86a87c080a3fcd3f8f3356962b4fd42d9fd5 | |
parent | 0482f7a736cf7d13ace4d8222efae333a3cfd61f (diff) | |
download | pttbbs-fa574c1beb97aca4e50fddf40a9a435344d367b3.tar pttbbs-fa574c1beb97aca4e50fddf40a9a435344d367b3.tar.gz pttbbs-fa574c1beb97aca4e50fddf40a9a435344d367b3.tar.bz2 pttbbs-fa574c1beb97aca4e50fddf40a9a435344d367b3.tar.lz pttbbs-fa574c1beb97aca4e50fddf40a9a435344d367b3.tar.xz pttbbs-fa574c1beb97aca4e50fddf40a9a435344d367b3.tar.zst pttbbs-fa574c1beb97aca4e50fddf40a9a435344d367b3.zip |
Define string macro GLOBAL_DIGEST in pttbbs.conf to set the digest board name.
Or undifine it to remove this feature.
git-svn-id: http://opensvn.csie.org/pttbbs/trunk/pttbbs@1532 63ad8ddf-47c3-0310-b6dd-a9e9d9715204
-rw-r--r-- | mbbsd/bbs.c | 4 | ||||
-rw-r--r-- | sample/pttbbs.conf | 3 | ||||
-rw-r--r-- | util/initbbs.c | 11 |
3 files changed, 16 insertions, 2 deletions
diff --git a/mbbsd/bbs.c b/mbbsd/bbs.c index 07ba91e1..250fa986 100644 --- a/mbbsd/bbs.c +++ b/mbbsd/bbs.c @@ -2332,11 +2332,13 @@ good_post(int ent, fileheader_t * fhdr, char *direct) strcpy(ptr, fn_mandex); append_record(buf, &digest, sizeof(digest)); +#ifdef GLOBAL_DIGEST if(!(getbcache(currbid)->brdattr & BRD_HIDE)) { getdata(1, 0, "好文值得出版到全站文摘?(N/y)", genbuf2, 3, LCECHO); if(genbuf2[0] == 'y') - do_crosspost("PttDigest", &digest, genbuf); + do_crosspost(GLOBAL_DIGEST, &digest, genbuf); } +#endif fhdr->filemode = (fhdr->filemode & ~FILE_MARKED) | FILE_DIGEST; if (!strcmp(currboard, "Note") || !strcmp(currboard, "PttBug") || diff --git a/sample/pttbbs.conf b/sample/pttbbs.conf index 8c3751f3..28f148c0 100644 --- a/sample/pttbbs.conf +++ b/sample/pttbbs.conf @@ -74,6 +74,9 @@ /* 若定義, 用一個奇怪的數字來檢查我的最愛和看板列表是否錯誤 */ #define MEM_CHECK 0x98761234 +/* 若定義, 則以此為版名提供全站文摘 */ +#define GLOBAL_DIGEST "PttDigest" + /* 若定義, 則可在外部 (shmctl cmsignal) 要求將 mbbsd將 zapbuf 釋放掉. 會使用非正規的記憶體要求函式. (目前只在 FreeBSD上測試過) !!請注意!! diff --git a/util/initbbs.c b/util/initbbs.c index e093fe02..8c146269 100644 --- a/util/initbbs.c +++ b/util/initbbs.c @@ -99,8 +99,8 @@ static void initBoards() { b.brdattr = BRD_POSTMASK | BRD_NOTRAN | BRD_NOZAP; b.level = 0; b.gid = 2; - newboard(fp, &b); + strcpy(b.brdname, "1..........."); strcpy(b.title, ".... Σ中央政府 《高壓危險,非人可敵》"); b.brdattr = BRD_GROUPBOARD; @@ -172,6 +172,15 @@ static void initBoards() { b.gid = 5; newboard(fp, &b); +#ifdef GLOBAL_DIGEST + strcpy(b.brdname, GLOBAL_DIGEST); + strcpy(b.title, "文摘 ◎" BBSNAME "文摘 好文的收集地"); + b.brdattr = BRD_NOTRAN | BRD_POSTMASK; + b.level = 0; + b.gid = 5; + newboard(fp, &b); +#endif + fclose(fp); } } |