summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorptt <ptt@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2004-06-22 03:47:01 +0800
committerptt <ptt@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2004-06-22 03:47:01 +0800
commit0bd0de593521362768058dbb6847b888a02562c0 (patch)
treef37cb1f10e4bddad214dddecaebff4710dfb832a
parent8851f4172fc5c7c0918b7f59f5ccebbbf9e97e51 (diff)
downloadpttbbs-0bd0de593521362768058dbb6847b888a02562c0.tar
pttbbs-0bd0de593521362768058dbb6847b888a02562c0.tar.gz
pttbbs-0bd0de593521362768058dbb6847b888a02562c0.tar.bz2
pttbbs-0bd0de593521362768058dbb6847b888a02562c0.tar.lz
pttbbs-0bd0de593521362768058dbb6847b888a02562c0.tar.xz
pttbbs-0bd0de593521362768058dbb6847b888a02562c0.tar.zst
pttbbs-0bd0de593521362768058dbb6847b888a02562c0.zip
Add a flag for BM to choose BRD_NOBOO by 'I'
git-svn-id: http://opensvn.csie.org/pttbbs/trunk/pttbbs@2076 63ad8ddf-47c3-0310-b6dd-a9e9d9715204
-rw-r--r--include/pttstruct.h1
-rw-r--r--mbbsd/bbs.c17
-rw-r--r--mbbsd/var.c4
3 files changed, 14 insertions, 8 deletions
diff --git a/include/pttstruct.h b/include/pttstruct.h
index 99be5a50..6c4dbf1e 100644
--- a/include/pttstruct.h
+++ b/include/pttstruct.h
@@ -176,6 +176,7 @@ typedef struct boardheader_t {
#define BRD_BLOG 000020000 /* BLOG */
#define BRD_BMCOUNT 000040000 /* 板主設定列入記錄 */
#define BRD_SYMBOLIC 000100000 /* symbolic link to board */
+#define BRD_NOBOO 000200000 /* 不可噓 */
#define BRD_LINK_TARGET(x) ((x)->postexpire)
#define GROUPOP() (currmode & MODE_GROUPOP)
diff --git a/mbbsd/bbs.c b/mbbsd/bbs.c
index c2edc1ec..1b8a77ce 100644
--- a/mbbsd/bbs.c
+++ b/mbbsd/bbs.c
@@ -1504,12 +1504,12 @@ recommend(int ent, fileheader_t * fhdr, char *direct)
struct tm *ptime = localtime(&now);
char buf[200], path[200],
*ctype[3] = {"37m推","31m噓","31m→"};
- int type;
+ int type = 0;
boardheader_t *bp;
static time_t lastrecommend = 0;
bp = getbcache(currbid);
- if( bp->brdattr & BRD_NORECOMMEND){
+ if( bp->brdattr & BRD_NORECOMMEND ){
vmsg("抱歉, 此處禁止推薦或競標");
return FULLUPDATE;
}
@@ -1529,7 +1529,8 @@ recommend(int ent, fileheader_t * fhdr, char *direct)
}
setdirpath(path, direct, fhdr->filename);
- type = (
+ if(!(bp->brdattr & BRD_NOBOO))
+ type = (
#ifdef OLDRECOMMEND
'1'
#else
@@ -2250,10 +2251,14 @@ b_changerecommend(int ent, fileheader_t * fhdr, char *direct)
if (!((currmode & MODE_BOARD) || HAS_PERM(PERM_SYSOP)))
return DONOTHING;
bp = getbcache(currbid);
- bp->brdattr ^= BRD_NORECOMMEND;
+ if(bp->brdattr & BRD_NOBOO)
+ bp->brdattr ^= BRD_NORECOMMEND;
+ if(!(bp->brdattr & BRD_NORECOMMEND) || !(bp->brdattr & BRD_NOBOO))
+ bp->brdattr ^= BRD_NOBOO;
substitute_record(fn_board, bp, sizeof(boardheader_t), currbid);
- vmsg("本板現在 %s 推薦",
- (bp->brdattr & BRD_NORECOMMEND) ? "禁止" : "開放");
+ vmsg("本板現在 %s 推薦, %s 噓聲",
+ (bp->brdattr & BRD_NORECOMMEND) ? "禁止" : "開放",
+ (bp->brdattr & BRD_NOBOO) ? "禁止" : "開放");
return FULLUPDATE;
}
diff --git a/mbbsd/var.c b/mbbsd/var.c
index fee645bd..5198b45a 100644
--- a/mbbsd/var.c
+++ b/mbbsd/var.c
@@ -57,8 +57,8 @@ char * const str_permboard[] = {
"不可推薦", /* BRD_NORECOMMEND */
"布落格", /* BRD_BLOG */
"板主設定列入記錄", /* BRD_BMCOUNT */
- "沒想到",
- "沒想到",
+ "連結看板", /* BRD_SYMBOLIC */
+ "不可噓", /* BRD_NOBOO */
"沒想到",
"沒想到",
"沒想到",