summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--mbbsd/bbs.c20
-rw-r--r--mbbsd/mail.c2
2 files changed, 14 insertions, 8 deletions
diff --git a/mbbsd/bbs.c b/mbbsd/bbs.c
index a4df61dc..c2edc1ec 100644
--- a/mbbsd/bbs.c
+++ b/mbbsd/bbs.c
@@ -318,13 +318,13 @@ do_select(int ent, fileheader_t * fhdr, char *direct)
/* 改良 innbbsd 轉出信件、連線砍信之處理程序 */
/* ----------------------------------------------------- */
void
-outgo_post(fileheader_t *fh, char *board)
+outgo_post(fileheader_t *fh, char *board, char *userid, char *username)
{
FILE *foo;
if ((foo = fopen("innd/out.bntp", "a"))) {
- fprintf(foo, "%s\t%s\t%s\t%s\t%s\n", board,
- fh->filename, cuser.userid, cuser.username, fh->title);
+ fprintf(foo, "%s\t%s\t%s\t%s\t%s\n",
+ board, fh->filename, userid, username, fh->title);
fclose(foo);
}
}
@@ -664,10 +664,16 @@ do_general(int isbid)
if (append_record(buf, &postfile, sizeof(postfile)) != -1) {
setbtotal(currbid);
- if (currmode & MODE_SELECT)
+ if( currmode & MODE_SELECT )
append_record(currdirect, &postfile, sizeof(postfile));
- if (!islocal && !(bp->brdattr & BRD_NOTRAN))
- outgo_post(&postfile, currboard);
+ if( !islocal && !(bp->brdattr & BRD_NOTRAN) ){
+#ifdef HAVE_ANONYMOUS
+ if( ifuseanony )
+ outgo_post(&postfile, currboard, owner, "Anonymous.");
+ else
+#endif
+ outgo_post(&postfile, currboard, cuser.userid, cuser.username);
+ }
brc_addlist(postfile.filename);
if (!(currbrdattr & BRD_HIDE) &&
@@ -1030,7 +1036,7 @@ cross_post(int ent, fileheader_t * fhdr, char *direct)
append_record(fname, &xfile, sizeof(xfile));
bp = getbcache(getbnum(xboard));
if (!xfile.filemode && !(bp->brdattr & BRD_NOTRAN))
- outgo_post(&xfile, xboard);
+ outgo_post(&xfile, xboard, cuser.userid, cuser.username);
setbtotal(getbnum(xboard));
cuser.numposts++;
UPDATE_USEREC;
diff --git a/mbbsd/mail.c b/mbbsd/mail.c
index 06f61e7b..003256c7 100644
--- a/mbbsd/mail.c
+++ b/mbbsd/mail.c
@@ -1102,7 +1102,7 @@ mail_cross_post(int ent, fileheader_t * fhdr, char *direct)
append_record(fname, &xfile, sizeof(xfile));
setbtotal(getbnum(xboard));
if (!xfile.filemode)
- outgo_post(&xfile, xboard);
+ outgo_post(&xfile, xboard, cuser.userid, cuser.username);
cuser.numposts++;
outmsg("文章轉錄完成");
pressanykey();