summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorpiaip <piaip@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2005-07-23 00:44:27 +0800
committerpiaip <piaip@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2005-07-23 00:44:27 +0800
commitecb8b2d326822691b2633451732f8d7685353383 (patch)
treef0d80e09ec906c58af06bcb275bd7634e2233d7e
parenta8207490ca0ba62ba301edd6f034837ef01bc7cf (diff)
downloadpttbbs-ecb8b2d326822691b2633451732f8d7685353383.tar
pttbbs-ecb8b2d326822691b2633451732f8d7685353383.tar.gz
pttbbs-ecb8b2d326822691b2633451732f8d7685353383.tar.bz2
pttbbs-ecb8b2d326822691b2633451732f8d7685353383.tar.lz
pttbbs-ecb8b2d326822691b2633451732f8d7685353383.tar.xz
pttbbs-ecb8b2d326822691b2633451732f8d7685353383.tar.zst
pttbbs-ecb8b2d326822691b2633451732f8d7685353383.zip
cp log format update
cp with invis board mosaic format update git-svn-id: http://opensvn.csie.org/pttbbs/trunk/pttbbs@2941 63ad8ddf-47c3-0310-b6dd-a9e9d9715204
-rw-r--r--mbbsd/bbs.c20
-rw-r--r--mbbsd/io.c4
-rw-r--r--mbbsd/vote.c8
3 files changed, 25 insertions, 7 deletions
diff --git a/mbbsd/bbs.c b/mbbsd/bbs.c
index e468e78d..1b5eb7e1 100644
--- a/mbbsd/bbs.c
+++ b/mbbsd/bbs.c
@@ -1175,22 +1175,32 @@ cross_post(int ent, fileheader_t * fhdr, const char *direct)
/* add cp log */
{
char buf[MAXPATHLEN];
- char bname[IDLEN+1] = "", *pbname = bname;
+ char bname[STRLEN] = "";
struct tm *ptime = localtime4(&now);
- int maxlength = 51 +2 - 11;
+ int maxlength = 51 +2 - 6;
- strcpy(bname, xboard);
if ((bp->brdattr & BRD_HIDE) && (bp->brdattr & BRD_POSTMASK))
+ {
+ /* mosaic it */
+ /*
+ // mosaic method 1
+ char *pbname = bname;
while(*pbname)
*pbname++ = '?';
+ */
+ // mosaic method 2
+ strcpy(bname, "某隱形看版");
+ } else {
+ sprintf(bname, "看板 %s", xboard);
+ }
maxlength -= (strlen(cuser.userid) + strlen(bname));
snprintf(buf, sizeof(buf),
// ANSI_COLOR(32) <- system will add green
- "※ " ANSI_COLOR(1) "%s"
+ "※ " ANSI_COLOR(1;32) "%s"
ANSI_COLOR(0;32)
- ":轉錄至看板 " ANSI_COLOR(1)
+ ":轉錄至"
"%s" ANSI_RESET "%*s"
"%15s %02d/%02d\n",
cuser.userid, bname, maxlength, "",
diff --git a/mbbsd/io.c b/mbbsd/io.c
index 76fe3065..3fcbf359 100644
--- a/mbbsd/io.c
+++ b/mbbsd/io.c
@@ -1007,7 +1007,9 @@ oldgetdata(int line, int col, const char *prompt, char *buf, int len, int echo)
strlcpy(lastcmd[0], buf, sizeof(lastcmd[0]));
memmove(lastcmd+1, lastcmd, (MAXLASTCMD-1)*sizeof(lastcmd[0]));
}
- outc('\n');
+ /* why return here? */
+ // outc('\n');
+ move(y+1, 0);
refresh();
}
if ((echo == LCECHO) && isupper((int)buf[0]))
diff --git a/mbbsd/vote.c b/mbbsd/vote.c
index f87ba9ac..aeeae5fc 100644
--- a/mbbsd/vote.c
+++ b/mbbsd/vote.c
@@ -141,11 +141,17 @@ b_suckinfile_invis(FILE * fp, char *fname, const char *boardname)
/* first time, try if boardname revealed. */
char *post = strstr(inbuf, str_post1);
if(!post) post = strstr(inbuf, str_post2);
- if(post) post = strstr(post, boardname);
+ if(post)
+ post = strstr(post, boardname);
if(post) {
/* found releaved stuff. */
+ /*
+ // mosaic method 1
while(*boardname++)
*post++ = '?';
+ */
+ // mosaic method 2
+ strcpy(post, "(某隱形看板)\n");
}
fputs(inbuf, fp);
while (fgets(inbuf, sizeof(inbuf), sfp))