summaryrefslogtreecommitdiffstats
path: root/mbbsd/mail.c
diff options
context:
space:
mode:
authorptt <ptt@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2005-10-14 00:19:19 +0800
committerptt <ptt@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2005-10-14 00:19:19 +0800
commit5dd1b69630a1614dd3cf7705c254e3f68d2a498d (patch)
treeba4c8e59b502dadc21cc04f9bc474b92ce2f99e5 /mbbsd/mail.c
parent4bc35b3870807886f1019cf52ad8e91d150774ef (diff)
downloadpttbbs-5dd1b69630a1614dd3cf7705c254e3f68d2a498d.tar
pttbbs-5dd1b69630a1614dd3cf7705c254e3f68d2a498d.tar.gz
pttbbs-5dd1b69630a1614dd3cf7705c254e3f68d2a498d.tar.bz2
pttbbs-5dd1b69630a1614dd3cf7705c254e3f68d2a498d.tar.lz
pttbbs-5dd1b69630a1614dd3cf7705c254e3f68d2a498d.tar.xz
pttbbs-5dd1b69630a1614dd3cf7705c254e3f68d2a498d.tar.zst
pttbbs-5dd1b69630a1614dd3cf7705c254e3f68d2a498d.zip
fix bug about mailalert
git-svn-id: http://opensvn.csie.org/pttbbs/trunk/pttbbs@3224 63ad8ddf-47c3-0310-b6dd-a9e9d9715204
Diffstat (limited to 'mbbsd/mail.c')
-rw-r--r--mbbsd/mail.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/mbbsd/mail.c b/mbbsd/mail.c
index 0b04a245..b0d9941b 100644
--- a/mbbsd/mail.c
+++ b/mbbsd/mail.c
@@ -863,6 +863,13 @@ read_new_mail(void * voidfptr, void *optarg)
return 0;
}
+void setmailalert()
+{
+ if(load_mailalert(cuser.userid))
+ currutmp->alerts |= ALERT_NEW_MAIL;
+ else
+ currutmp->alerts &= ~ALERT_NEW_MAIL;
+}
int
m_new(void)
{
@@ -880,7 +887,7 @@ m_new(void)
return -1;
}
curredit = 0;
- currutmp->alerts |= load_mailalert(cuser.userid);
+ setmailalert();
while (arg.delcnt--)
delete_record(currmaildir, sizeof(fileheader_t), arg.delmsgs[arg.delcnt]);
if(arg.delmsgs)
@@ -1597,7 +1604,7 @@ m_read(void)
i_read(RMAIL, currmaildir, mailtitle, maildoent, mail_comms, -1);
currbid = back_bid;
curredit = 0;
- currutmp->alerts |= load_mailalert(cuser.userid);
+ setmailalert();
return 0;
} else {
outs("您沒有來信");