diff options
author | piaip <piaip@63ad8ddf-47c3-0310-b6dd-a9e9d9715204> | 2005-08-05 17:32:59 +0800 |
---|---|---|
committer | piaip <piaip@63ad8ddf-47c3-0310-b6dd-a9e9d9715204> | 2005-08-05 17:32:59 +0800 |
commit | 9d3aa427007b823892fff7be25e393443a27133c (patch) | |
tree | 83be0cf6de7c4dc60d199ef45a3974afda91352d /mbbsd/mail.c | |
parent | 9cbf93e41956fddeadf60c0d454da12ec8fc2487 (diff) | |
download | pttbbs-9d3aa427007b823892fff7be25e393443a27133c.tar pttbbs-9d3aa427007b823892fff7be25e393443a27133c.tar.gz pttbbs-9d3aa427007b823892fff7be25e393443a27133c.tar.bz2 pttbbs-9d3aa427007b823892fff7be25e393443a27133c.tar.lz pttbbs-9d3aa427007b823892fff7be25e393443a27133c.tar.xz pttbbs-9d3aa427007b823892fff7be25e393443a27133c.tar.zst pttbbs-9d3aa427007b823892fff7be25e393443a27133c.zip |
- multi.money updates,
- experimental money listing mode
- prevent unread black-hole mails
git-svn-id: http://opensvn.csie.org/pttbbs/trunk/pttbbs@2987 63ad8ddf-47c3-0310-b6dd-a9e9d9715204
Diffstat (limited to 'mbbsd/mail.c')
-rw-r--r-- | mbbsd/mail.c | 18 |
1 files changed, 13 insertions, 5 deletions
diff --git a/mbbsd/mail.c b/mbbsd/mail.c index ad6fa9df..aa553b42 100644 --- a/mbbsd/mail.c +++ b/mbbsd/mail.c @@ -606,6 +606,7 @@ multi_send(char *title) strlcpy(mymail.owner, cuser.userid, sizeof(mymail.owner)); strlcpy(mymail.title, save_title, sizeof(mymail.title)); + /* TODO is this really going to work!?!?!? */ mymail.filemode |= FILE_MULTI; /* multi-send flag */ sethomedir(genbuf, p->word); if (append_record_forward(genbuf, &mymail, sizeof(mymail), p->word) == -1) @@ -800,7 +801,7 @@ read_new_mail(void * voidfptr, void *optarg) arg->mrd = 1; delete_it = NA; while (!done) { - int more_result = more(fname, YEA); + int more_result = more(fname, YEA); switch (more_result) { case 999: @@ -1009,16 +1010,23 @@ mail_read(int ent, fileheader_t * fhdr, const char *direct) while (!done) { int more_result = more(buf, YEA); - if (more_result != -1) { + /* whether success or not, update flag. + * or users may bug about "black-hole" mails + * and blinking notification */ + if( !(fhdr->filemode & FILE_READ)) + { fhdr->filemode |= FILE_READ; - substitute_ref_record(direct, fhdr, ent); + substitute_ref_record(direct, fhdr, ent); } switch (more_result) { + case -1: + /* no such file */ + clear(); + vmsg("此封信無內容。"); + return FULLUPDATE; case 999: mail_reply(ent, fhdr, direct); return FULLUPDATE; - case -1: - return READ_SKIP; case 0: break; default: |