diff options
-rw-r--r-- | pttbbs/include/uflags.h | 2 | ||||
-rw-r--r-- | pttbbs/mbbsd/bbs.c | 6 | ||||
-rw-r--r-- | pttbbs/mbbsd/user.c | 7 |
3 files changed, 14 insertions, 1 deletions
diff --git a/pttbbs/include/uflags.h b/pttbbs/include/uflags.h index 5d40abfa..532138c0 100644 --- a/pttbbs/include/uflags.h +++ b/pttbbs/include/uflags.h @@ -20,7 +20,7 @@ #define UF_DBCS_DROP_REPEAT 0x00000800 // detect and drop repeated input from evil clients // #define UF_DBCS_??? 0x00000800 // reserved #define UF_NO_MODMARK 0x00001000 // true if modified files are NOT marked -// #define UF_COLORED_MODMARK 0x00002000 // deprecated flag. RESET before you use it. +#define UF_COLORED_MODMARK 0x00002000 // true if mod-mark is coloured. // #define UF_MODMARK_??? 0x00004000 // reserved // #define UF_MODMARK_??? 0x00008000 // reserved #define UF_DEFBACKUP 0x00010000 // true if user defaults to backup diff --git a/pttbbs/mbbsd/bbs.c b/pttbbs/mbbsd/bbs.c index bcb21973..1d32d545 100644 --- a/pttbbs/mbbsd/bbs.c +++ b/pttbbs/mbbsd/bbs.c @@ -644,6 +644,12 @@ readdoent(int num, fileheader_t * ent) { oisunread = isunread = 0; } + // if user wants colored marks, use 'read' marks + else if (HasUserFlag(UF_COLORED_MODMARK)) + { + isunread = 0; + typeattr = ANSI_COLOR(36); + } } // handle 'type' diff --git a/pttbbs/mbbsd/user.c b/pttbbs/mbbsd/user.c index b0e1cf2b..36a3716f 100644 --- a/pttbbs/mbbsd/user.c +++ b/pttbbs/mbbsd/user.c @@ -427,6 +427,7 @@ void Customize(void) UF_FAV_ADDNEW, UF_FAV_NOHILIGHT, UF_NO_MODMARK , + UF_COLORED_MODMARK, #ifdef DBCSAWARE UF_DBCS_AWARE, UF_DBCS_DROP_REPEAT, @@ -443,6 +444,7 @@ void Customize(void) "MYFAV 新板自動進我的最愛", "MYFAV 單色顯示我的最愛", "MODMARK 隱藏文章修改符號(推文/修文) (~)", + "MODMARK 停止使用色彩代替修改符號 (+)", #ifdef DBCSAWARE "DBCS 自動偵測雙位元字集(如全型中文)", "DBCS 忽略連線程式為雙位元字集送出的重複按鍵", @@ -468,6 +470,8 @@ void Customize(void) for (i = 0; masks1[i]; i++, ia++) { clrtoeol(); + if (masks1[i] == UF_COLORED_MODMARK) + continue; prints( ANSI_COLOR(1;36) "%c" ANSI_RESET ". %-*s%s\n", 'a' + ia, @@ -519,6 +523,9 @@ void Customize(void) /* normal pref */ key -= 'a'; dirty = 1; + if (masks1[key] == UF_COLORED_MODMARK && + !HasUserFlag(UF_COLORED_MODMARK)) + continue; pwcuToggleUserFlag(masks1[key]); continue; } |