diff options
Diffstat (limited to 'mbbsd')
-rw-r--r-- | mbbsd/bbs.c | 16 | ||||
-rw-r--r-- | mbbsd/board.c | 12 | ||||
-rw-r--r-- | mbbsd/register.c | 2 |
3 files changed, 24 insertions, 6 deletions
diff --git a/mbbsd/bbs.c b/mbbsd/bbs.c index 40c70a89..4d83cfb4 100644 --- a/mbbsd/bbs.c +++ b/mbbsd/bbs.c @@ -2672,15 +2672,14 @@ do_bid(int ent, fileheader_t * fhdr, const boardheader_t *bp, return FULLUPDATE; } -static int + int recommend(int ent, fileheader_t * fhdr, const char *direct) { struct tm *ptime = localtime4(&now); char buf[PATHLEN], msg[STRLEN]; const char *myid = cuser.userid; -#if defined(PLAY_ANGEL) && defined(BN_ANGELPRAY) && defined(ANGEL_ANONYMOUS_COMMENT) + char aligncmt = 0; char mynick[IDLEN+1]; -#endif // PLAY_ANGEL #ifndef OLDRECOMMEND static const char *ctype[3] = { "推", "噓", "→" @@ -2721,7 +2720,6 @@ recommend(int ent, fileheader_t * fhdr, const char *direct) vmsg("抱歉, 禁止推薦或競標"); return FULLUPDATE; } - if ( !CheckPostPerm() || bp->brdattr & BRD_VOTEBOARD || #ifndef GUESTRECOMMEND @@ -2751,6 +2749,7 @@ recommend(int ent, fileheader_t * fhdr, const char *direct) } #endif + aligncmt = (bp->brdattr & BRD_ALIGNEDCMT) ? 1 : 0; if((currmode & MODE_BOARD) || HasUserPerm(PERM_SYSOP)) { /* I'm BM or SYSOP. */ @@ -2924,7 +2923,14 @@ recommend(int ent, fileheader_t * fhdr, const char *direct) angel_load_my_fullnick(mynick, sizeof(mynick)); myid = mynick; } -#endif +#endif + + if (aligncmt) + { + snprintf(buf, sizeof(buf), "%*s", IDLEN, myid); + strlcpy(mynick, buf, sizeof(mynick)); + myid = mynick; + } #ifdef OLDRECOMMEND maxlength -= 2; /* '推' */ diff --git a/mbbsd/board.c b/mbbsd/board.c index 4d643242..26add700 100644 --- a/mbbsd/board.c +++ b/mbbsd/board.c @@ -285,7 +285,7 @@ b_config(void) cachePostRes = CheckPostRestriction(currbid); char canpost = (cachePostPerm && cachePostRes); -#define LNBOARDINFO (17) +#define LNBOARDINFO (18) #define LNPOSTRES (12) #define COLPOSTRES (50) @@ -392,6 +392,11 @@ b_config(void) (bp->brdattr & BRD_IPLOGRECMD) ? ANSI_COLOR(1)"自動":"不會"); + prints( " " ANSI_COLOR(1;36) "a" ANSI_RESET + " - 推文時 %s" ANSI_RESET " 開頭\n", + (bp->brdattr & BRD_ALIGNEDCMT) ? + ANSI_COLOR(1)"對齊":"不對齊"); + #ifdef USE_AUTOCPLOG prints( " " ANSI_COLOR(1;36) "x" ANSI_RESET " - 轉錄文章 %s " ANSI_RESET "自動記錄,且 %s " @@ -547,6 +552,11 @@ b_config(void) bp->brdattr ^= BRD_LOCALSAVE; touched = 1; break; + + case 'a': + bp->brdattr ^= BRD_ALIGNEDCMT; + touched = 1; + break; case 'e': if(HasUserPerm(PERM_SYSOP)) diff --git a/mbbsd/register.c b/mbbsd/register.c index 4323634c..fda547ed 100644 --- a/mbbsd/register.c +++ b/mbbsd/register.c @@ -2378,6 +2378,7 @@ regform2_validate_page(int dryrun) * return value 應該是指 reason (return index + 1) * ans[0] 指的是帳管選擇的「錯誤的欄位」 (Register 選單裡看到的那些) */ +#if 0 static int auto_scan(char fdata[][STRLEN], char ans[]) { @@ -2460,6 +2461,7 @@ auto_scan(char fdata[][STRLEN], char ans[]) } else return 0; } +#endif int m_register(void) |