diff options
author | scw <scw@63ad8ddf-47c3-0310-b6dd-a9e9d9715204> | 2008-11-16 18:20:15 +0800 |
---|---|---|
committer | scw <scw@63ad8ddf-47c3-0310-b6dd-a9e9d9715204> | 2008-11-16 18:20:15 +0800 |
commit | 97b26dd92cdd0f51051dd2762c2584db77273191 (patch) | |
tree | 77ca0241d8c3adcc5aeba43582f1696cbeafb289 /mbbsd/mail.c | |
parent | e04cae0836e65a13d3ea8166df4b291aafaa4f53 (diff) | |
download | pttbbs-97b26dd92cdd0f51051dd2762c2584db77273191.tar pttbbs-97b26dd92cdd0f51051dd2762c2584db77273191.tar.gz pttbbs-97b26dd92cdd0f51051dd2762c2584db77273191.tar.bz2 pttbbs-97b26dd92cdd0f51051dd2762c2584db77273191.tar.lz pttbbs-97b26dd92cdd0f51051dd2762c2584db77273191.tar.xz pttbbs-97b26dd92cdd0f51051dd2762c2584db77273191.tar.zst pttbbs-97b26dd92cdd0f51051dd2762c2584db77273191.zip |
Post and money update:
* no money for posts on boards without BM
* BM and self deleting posts decrease number of posts regardless of login
git-svn-id: http://opensvn.csie.org/pttbbs/trunk/pttbbs@4420 63ad8ddf-47c3-0310-b6dd-a9e9d9715204
Diffstat (limited to 'mbbsd/mail.c')
-rw-r--r-- | mbbsd/mail.c | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/mbbsd/mail.c b/mbbsd/mail.c index d0eecd2f..fc7ae823 100644 --- a/mbbsd/mail.c +++ b/mbbsd/mail.c @@ -119,16 +119,24 @@ built_mail_index(void) int sendalert(const char *userid, int alert) { - userinfo_t *uentp = NULL; - int n, tuid, i; + int tuid; if ((tuid = searchuser(userid, NULL)) == 0) return -1; - n = count_logins(tuid, 0); + return sendalert_uid(tuid, alert); +} + +int +sendalert_uid(int uid, int alert){ + userinfo_t *uentp = NULL; + int n, i; + + n = count_logins(uid, 0); for (i = 1; i <= n; i++) - if ((uentp = (userinfo_t *) search_ulistn(tuid, i))) + if ((uentp = (userinfo_t *) search_ulistn(uid, i))) uentp->alerts |= alert; + return 0; } |