diff options
author | piaip <piaip@63ad8ddf-47c3-0310-b6dd-a9e9d9715204> | 2013-09-11 15:35:04 +0800 |
---|---|---|
committer | piaip <piaip@63ad8ddf-47c3-0310-b6dd-a9e9d9715204> | 2013-09-11 15:35:04 +0800 |
commit | 1388d795c968e54b91d9fb0f78c86c2587cb0c57 (patch) | |
tree | 62b6b697e1d1ee884b5624e03c58f4ecf78ced6f | |
parent | a3169453b4f9eb694d645e01960a307601a32fa6 (diff) | |
download | pttbbs-1388d795c968e54b91d9fb0f78c86c2587cb0c57.tar pttbbs-1388d795c968e54b91d9fb0f78c86c2587cb0c57.tar.gz pttbbs-1388d795c968e54b91d9fb0f78c86c2587cb0c57.tar.bz2 pttbbs-1388d795c968e54b91d9fb0f78c86c2587cb0c57.tar.lz pttbbs-1388d795c968e54b91d9fb0f78c86c2587cb0c57.tar.xz pttbbs-1388d795c968e54b91d9fb0f78c86c2587cb0c57.tar.zst pttbbs-1388d795c968e54b91d9fb0f78c86c2587cb0c57.zip |
Revise angel report to contain 120d active master number (to align with how
Angel Beats! reports).
git-svn-id: http://opensvn.csie.org/pttbbs/trunk@5871 63ad8ddf-47c3-0310-b6dd-a9e9d9715204
-rw-r--r-- | pttbbs/util/angel.c | 18 |
1 files changed, 11 insertions, 7 deletions
diff --git a/pttbbs/util/angel.c b/pttbbs/util/angel.c index 090b8df6..8366a7c6 100644 --- a/pttbbs/util/angel.c +++ b/pttbbs/util/angel.c @@ -54,6 +54,7 @@ typedef struct { int masters_week; int masters_month; int masters_quater; + int masters_period; } AngelRecord; int buildMasterInfo(AngelRecord *rec, int num_recs) { @@ -71,8 +72,6 @@ int buildMasterInfo(AngelRecord *rec, int num_recs) { uid++; r->uid = uid; assert(uid <= num_recs); - if (uid % 1000 == 0) - fprintf(stderr, "."); if (!*user.userid) continue; if (user.role & ROLE_ANGEL_ACTIVITY) @@ -94,6 +93,8 @@ int buildMasterInfo(AngelRecord *rec, int num_recs) { angel->masters_month++; if (now - user.timeplayangel < DAY_SECONDS * 90) angel->masters_quater++; + if (now - user.timeplayangel < DAY_SECONDS * 120) + angel->masters_period++; } fclose(fp); return count; @@ -117,16 +118,19 @@ int generateReport(FILE *fp, AngelRecord *rec, int num_recs, int delete_file) { fprintf(fp, "瞷ぱㄏΤ %d :\n", num_recs); fprintf(fp, - " (计场计 | 秅ず | るず | ﹗ず" - " 臘计,\n" - " 臘琌赣琿丁ずΤ肚癳癟倒ヴぱㄏ)\n"); + " (计场计 | 7ぱず | 30ぱず | 90ぱず | 120ぱ\n" + " 臘计(赣琿丁ずΤ肚癳癟倒ヴぱㄏ)\n" + " 猔種ヘ玡臘度参璸Τ癳癟礚猭眔ぱㄏ\n" + " 琌本 - ┮叫皌┾琩挡狦蝶︳)\n"); for (i = 0; i < num_recs; i++) - fprintf(fp, "%15s | %6d | %6d | %6d | %6d\n", + fprintf(fp, "%15s | %6d | %6d | %6d | %6d | %6d\n", getuserid(rec[i].uid), rec[i].masters, rec[i].masters_week, rec[i].masters_month, - rec[i].masters_quater); + rec[i].masters_quater, + rec[i].masters_period + ); fputs("\n", fp); appendLogFile(fp, "log/angel_perf.txt", |