diff options
-rw-r--r-- | mbbsd/admin.c | 2 | ||||
-rw-r--r-- | mbbsd/cache.c | 10 | ||||
-rw-r--r-- | sample/pttbbs.conf | 2 |
3 files changed, 12 insertions, 2 deletions
diff --git a/mbbsd/admin.c b/mbbsd/admin.c index 8aded7cb..68ff5cce 100644 --- a/mbbsd/admin.c +++ b/mbbsd/admin.c @@ -1846,7 +1846,7 @@ review_register_form(const char *regfile, int dryrun) ri+1, (unum && search_ulist(unum)) ? ANSI_COLOR(1;35) : "" ANSI_COLOR(1), - (unum == 0) ? ANSI_COLOR(1;31) "X" ANSI_RESET : + (unum == 0) ? ANSI_COLOR(1;31) "D" ANSI_RESET : ( (muser.userlevel & PERM_LOGINOK) ? ANSI_COLOR(1;33) "Y" ANSI_RESET : " "), v); diff --git a/mbbsd/cache.c b/mbbsd/cache.c index 58234432..6155753c 100644 --- a/mbbsd/cache.c +++ b/mbbsd/cache.c @@ -941,9 +941,17 @@ reload_pttcache(void) // .DIR loop while (fread(&item, sizeof(item), 1, fp)) { + int chkagg = 0; // should we check aggressive? + if (item.title[3] != '<' || item.title[8] != '>') continue; +#ifdef GLOBAL_NOTE_AGGCHKDIR + // TODO aggressive: only count '<點歌>' section + if (strcmp(item.title, GLOBAL_NOTE_AGGCHKDIR) == 0) + chkagg = 1; +#endif + snprintf(buf, sizeof(buf), "%s/%s/" FN_DIR, pbuf, item.filename); @@ -970,7 +978,7 @@ reload_pttcache(void) memset(SHM->notes[id], 0, sizeof(SHM->notes[0])); rawid --; } - else if (filter_aggressive(SHM->notes[id])) + else if (chkagg && filter_aggressive(SHM->notes[id])) { aggid++; // handle aggressive notes by last detemined state diff --git a/sample/pttbbs.conf b/sample/pttbbs.conf index 502e1e87..01fb388c 100644 --- a/sample/pttbbs.conf +++ b/sample/pttbbs.conf @@ -74,6 +74,8 @@ //#define GLOBAL_FIVECHESS_LOG BBSMNAME "Five" //#define GLOBAL_CCHESS_LOG BBSMNAME "CChess" +/* 若定義,則動態看板會動態檢查爭議性字眼 */ +//#define GLOBAL_NOTE_AGGCHKDIR "<點歌> 動態看板" /* 最大編輯行數, 以防有惡意使用者 post 巨大文章 */ #define MAX_EDIT_LINE (2048) |