summaryrefslogtreecommitdiffstats
path: root/mbbsd/mail.c
diff options
context:
space:
mode:
authorptt <ptt@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2005-10-13 23:22:21 +0800
committerptt <ptt@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2005-10-13 23:22:21 +0800
commit4bc35b3870807886f1019cf52ad8e91d150774ef (patch)
tree72d8a05b274b439c175486d086e0ceeb3f811c34 /mbbsd/mail.c
parenta3b209f669a99367136225cf890487df69dfabe0 (diff)
downloadpttbbs-4bc35b3870807886f1019cf52ad8e91d150774ef.tar
pttbbs-4bc35b3870807886f1019cf52ad8e91d150774ef.tar.gz
pttbbs-4bc35b3870807886f1019cf52ad8e91d150774ef.tar.bz2
pttbbs-4bc35b3870807886f1019cf52ad8e91d150774ef.tar.lz
pttbbs-4bc35b3870807886f1019cf52ad8e91d150774ef.tar.xz
pttbbs-4bc35b3870807886f1019cf52ad8e91d150774ef.tar.zst
pttbbs-4bc35b3870807886f1019cf52ad8e91d150774ef.zip
changes mailalert to 1 bit only.
reserved other 7 trigers for updating current status on the fly when user is online. git-svn-id: http://opensvn.csie.org/pttbbs/trunk/pttbbs@3223 63ad8ddf-47c3-0310-b6dd-a9e9d9715204
Diffstat (limited to 'mbbsd/mail.c')
-rw-r--r--mbbsd/mail.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/mbbsd/mail.c b/mbbsd/mail.c
index 56784a24..0b04a245 100644
--- a/mbbsd/mail.c
+++ b/mbbsd/mail.c
@@ -103,7 +103,7 @@ mailalert(const char *userid)
n = count_logins(tuid, 0);
for (i = 1; i <= n; i++)
if ((uentp = (userinfo_t *) search_ulistn(tuid, i)))
- uentp->mailalert = 1;
+ uentp->alerts |= ALERT_NEW_MAIL;
return 0;
}
@@ -880,7 +880,7 @@ m_new(void)
return -1;
}
curredit = 0;
- currutmp->mailalert = load_mailalert(cuser.userid);
+ currutmp->alerts |= load_mailalert(cuser.userid);
while (arg.delcnt--)
delete_record(currmaildir, sizeof(fileheader_t), arg.delmsgs[arg.delcnt]);
if(arg.delmsgs)
@@ -1597,7 +1597,7 @@ m_read(void)
i_read(RMAIL, currmaildir, mailtitle, maildoent, mail_comms, -1);
currbid = back_bid;
curredit = 0;
- currutmp->mailalert = load_mailalert(cuser.userid);
+ currutmp->alerts |= load_mailalert(cuser.userid);
return 0;
} else {
outs("您沒有來信");
@@ -1879,7 +1879,7 @@ load_mailalert(const char *userid)
read(fd, &my_mail, sizeof(fileheader_t));
if (!(my_mail.filemode & FILE_READ)) {
close(fd);
- return 1;
+ return ALERT_NEW_MAIL;
}
lseek(fd, -(off_t) 2 * sizeof(fileheader_t), SEEK_CUR);
}