summaryrefslogtreecommitdiffstats
path: root/mbbsd
diff options
context:
space:
mode:
Diffstat (limited to 'mbbsd')
-rw-r--r--mbbsd/bbs.c12
-rw-r--r--mbbsd/passwd.c2
2 files changed, 14 insertions, 0 deletions
diff --git a/mbbsd/bbs.c b/mbbsd/bbs.c
index 784ca75c..2d068841 100644
--- a/mbbsd/bbs.c
+++ b/mbbsd/bbs.c
@@ -2329,7 +2329,10 @@ recommend_cancel(int ent, fileheader_t * fhdr, const char *direct)
#ifdef ASSESS
// to save resource
if (fhdr->recommend > 9)
+ {
inc_goodpost(fhdr->owner, -1 * (fhdr->recommend / 10));
+ sendalert(fhdr->owner, ALERT_PWD_GOODPOST);
+ }
#endif
fhdr->recommend = 0;
@@ -2859,7 +2862,10 @@ recommend(int ent, fileheader_t * fhdr, const char *direct)
#ifdef ASSESS
/* 每 10 次推文 加一次 goodpost */
if (type ==0 && (fhdr->filemode & FILE_MARKED) && fhdr->recommend % 10 == 0)
+ {
inc_goodpost(fhdr->owner, 1);
+ sendalert(fhdr->owner, ALERT_PWD_GOODPOST);
+ }
#endif
lastrecommend = now;
@@ -2889,10 +2895,16 @@ mark_post(int ent, fileheader_t * fhdr, const char *direct)
if (!(fhdr->filemode & FILE_BID)){
if (fhdr->filemode & FILE_MARKED) {
if (!(currbrdattr & BRD_BAD) && fhdr->recommend >= 10)
+ {
inc_goodpost(fhdr->owner, fhdr->recommend / 10);
+ sendalert(fhdr->owner, ALERT_PWD_GOODPOST);
+ }
}
else if (fhdr->recommend > 9)
+ {
inc_goodpost(fhdr->owner, -1 * (fhdr->recommend / 10));
+ sendalert(fhdr->owner, ALERT_PWD_GOODPOST);
+ }
}
#endif
diff --git a/mbbsd/passwd.c b/mbbsd/passwd.c
index 036d6d99..15323be2 100644
--- a/mbbsd/passwd.c
+++ b/mbbsd/passwd.c
@@ -82,6 +82,8 @@ passwd_update(int num, userec_t * buf)
passwd_query(num, &u);
if(pwdfd & ALERT_PWD_BADPOST)
cuser.badpost = buf->badpost = u.badpost;
+ if(pwdfd & ALERT_PWD_GOODPOST)
+ cuser.goodpost = buf->goodpost = u.goodpost;
if(pwdfd & ALERT_PWD_PERM)
cuser.userlevel = buf->userlevel = u.userlevel;
currutmp->alerts &= ~ALERT_PWD;