diff options
author | piaip <piaip@63ad8ddf-47c3-0310-b6dd-a9e9d9715204> | 2005-07-22 21:23:44 +0800 |
---|---|---|
committer | piaip <piaip@63ad8ddf-47c3-0310-b6dd-a9e9d9715204> | 2005-07-22 21:23:44 +0800 |
commit | 8171f45b5684b734ce19551acee8381dfbb71a07 (patch) | |
tree | 86b71b80d9bd09538c913750cfc7271ded20a618 | |
parent | b98ca2c4a39ac4bfbd45875c493d0d6f2388d818 (diff) | |
download | pttbbs-8171f45b5684b734ce19551acee8381dfbb71a07.tar pttbbs-8171f45b5684b734ce19551acee8381dfbb71a07.tar.gz pttbbs-8171f45b5684b734ce19551acee8381dfbb71a07.tar.bz2 pttbbs-8171f45b5684b734ce19551acee8381dfbb71a07.tar.lz pttbbs-8171f45b5684b734ce19551acee8381dfbb71a07.tar.xz pttbbs-8171f45b5684b734ce19551acee8381dfbb71a07.tar.zst pttbbs-8171f45b5684b734ce19551acee8381dfbb71a07.zip |
if cp to invisible board, mosaic the destination name
git-svn-id: http://opensvn.csie.org/pttbbs/trunk/pttbbs@2939 63ad8ddf-47c3-0310-b6dd-a9e9d9715204
-rw-r--r-- | mbbsd/bbs.c | 17 |
1 files changed, 13 insertions, 4 deletions
diff --git a/mbbsd/bbs.c b/mbbsd/bbs.c index 0ce450b8..d5d94e81 100644 --- a/mbbsd/bbs.c +++ b/mbbsd/bbs.c @@ -1169,19 +1169,29 @@ cross_post(int ent, fileheader_t * fhdr, const char *direct) addsignature(xptr, 0); fclose(xptr); + /* now point bp to new bord */ + bp = getbcache(getbnum(xboard)); + /* add cp log */ { char buf[MAXPATHLEN]; - int maxlength = 51 +2 -14 - - strlen(cuser.userid) - strlen(xboard); + char bname[IDLEN+1] = "", *pbname = bname; struct tm *ptime = localtime4(&now); + int maxlength = 51 +2 -14; + + strcpy(bname, xboard); + if ((bp->brdattr & BRD_HIDE) && (bp->brdattr & BRD_POSTMASK)) + while(*pbname) + *pbname++ = '?'; + + maxlength -= (strlen(cuser.userid) + strlen(bname)); snprintf(buf, sizeof(buf), ANSI_COLOR(1;31) "¡÷ " ANSI_COLOR(33) "%s" ANSI_RESET ANSI_COLOR(32) ":Âà¿ý¦Ü¬ÝªO¡u%s¡v" ANSI_RESET "%*s" "%15s %02d/%02d\n", - cuser.userid, xboard, maxlength, "", + cuser.userid, bname, maxlength, "", fromhost, ptime->tm_mon + 1, ptime->tm_mday); do_add_recommend(direct, fhdr, ent, buf, 2); } @@ -1191,7 +1201,6 @@ cross_post(int ent, fileheader_t * fhdr, const char *direct) */ setbdir(fname, xboard); append_record(fname, &xfile, sizeof(xfile)); - bp = getbcache(getbnum(xboard)); if (!xfile.filemode && !(bp->brdattr & BRD_NOTRAN)) outgo_post(&xfile, xboard, cuser.userid, cuser.nickname); #ifdef USE_COOLDOWN |