summaryrefslogtreecommitdiffstats
path: root/mbbsd/mail.c
diff options
context:
space:
mode:
authorptt <ptt@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2005-11-16 00:51:33 +0800
committerptt <ptt@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2005-11-16 00:51:33 +0800
commitfafe4c7e70de4e770f6bf7f42306957330aaadea (patch)
tree204c1a4906a4482104adf096a6f85d7efafc70c3 /mbbsd/mail.c
parent419924bb39cc1d1ef0cecb4bd904e90c564cadfa (diff)
downloadpttbbs-fafe4c7e70de4e770f6bf7f42306957330aaadea.tar
pttbbs-fafe4c7e70de4e770f6bf7f42306957330aaadea.tar.gz
pttbbs-fafe4c7e70de4e770f6bf7f42306957330aaadea.tar.bz2
pttbbs-fafe4c7e70de4e770f6bf7f42306957330aaadea.tar.lz
pttbbs-fafe4c7e70de4e770f6bf7f42306957330aaadea.tar.xz
pttbbs-fafe4c7e70de4e770f6bf7f42306957330aaadea.tar.zst
pttbbs-fafe4c7e70de4e770f6bf7f42306957330aaadea.zip
PERMISSION can be changed even if the user is online.
git-svn-id: http://opensvn.csie.org/pttbbs/trunk/pttbbs@3241 63ad8ddf-47c3-0310-b6dd-a9e9d9715204
Diffstat (limited to 'mbbsd/mail.c')
-rw-r--r--mbbsd/mail.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/mbbsd/mail.c b/mbbsd/mail.c
index b0d9941b..da8f2a1c 100644
--- a/mbbsd/mail.c
+++ b/mbbsd/mail.c
@@ -92,7 +92,7 @@ built_mail_index(void)
}
int
-mailalert(const char *userid)
+sendalert(const char *userid, int alert)
{
userinfo_t *uentp = NULL;
int n, tuid, i;
@@ -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->alerts |= ALERT_NEW_MAIL;
+ uentp->alerts |= alert;
return 0;
}
@@ -128,7 +128,7 @@ mail_id(const char *id, const char *title, const char *src, const char *owner)
sethomedir(dirf, id);
append_record_forward(dirf, &mhdr, sizeof(mhdr), id);
- mailalert(id);
+ sendalert(id, ALERT_NEW_MAIL);
return 0;
}
@@ -392,7 +392,7 @@ do_send(const char *userid, const char *title)
sethomedir(fpath, userid);
if (append_record_forward(fpath, &mhdr, sizeof(mhdr), userid) == -1)
return -1;
- mailalert(userid);
+ sendalert(userid,ALERT_NEW_MAIL);
}
hold_mail(genbuf, userid);
return 0;
@@ -614,7 +614,7 @@ multi_send(char *title)
sethomedir(genbuf, p->word);
if (append_record_forward(genbuf, &mymail, sizeof(mymail), p->word) == -1)
vmsg(err_uid);
- mailalert(p->word);
+ sendalert(p->word, ALERT_NEW_MAIL);
}
hold_mail(fpath, NULL);
unlink(fpath);