summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorin2 <in2@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2004-06-15 21:20:59 +0800
committerin2 <in2@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2004-06-15 21:20:59 +0800
commit1aca8f8271d88c5d5b55bbd2f0268e1f42d194b9 (patch)
treecfd4619c3c0a8a5511959b76f80fcaaf27452fd1
parentb73be94cdccb1752e25b731db46477f28ce30a90 (diff)
downloadpttbbs-1aca8f8271d88c5d5b55bbd2f0268e1f42d194b9.tar
pttbbs-1aca8f8271d88c5d5b55bbd2f0268e1f42d194b9.tar.gz
pttbbs-1aca8f8271d88c5d5b55bbd2f0268e1f42d194b9.tar.bz2
pttbbs-1aca8f8271d88c5d5b55bbd2f0268e1f42d194b9.tar.lz
pttbbs-1aca8f8271d88c5d5b55bbd2f0268e1f42d194b9.tar.xz
pttbbs-1aca8f8271d88c5d5b55bbd2f0268e1f42d194b9.tar.zst
pttbbs-1aca8f8271d88c5d5b55bbd2f0268e1f42d194b9.zip
anonymous posting in inn
git-svn-id: http://opensvn.csie.org/pttbbs/trunk/pttbbs@2068 63ad8ddf-47c3-0310-b6dd-a9e9d9715204
-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();