diff options
Diffstat (limited to 'mbbsd')
-rw-r--r-- | mbbsd/bbs.c | 17 | ||||
-rw-r--r-- | mbbsd/var.c | 4 |
2 files changed, 13 insertions, 8 deletions
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 */ "沒想到", "沒想到", "沒想到", |