summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorpiaip <piaip@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2013-03-26 01:27:12 +0800
committerpiaip <piaip@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2013-03-26 01:27:12 +0800
commit4c6b03cc1c8c94040e3f6e3faa95594241b5c9bd (patch)
treeaaff62f251c0089aa85f1c942c77b3167c3da7e3
parent23c328adeaf1f34aaf8afe8c36d6a7778c219313 (diff)
downloadpttbbs-4c6b03cc1c8c94040e3f6e3faa95594241b5c9bd.tar
pttbbs-4c6b03cc1c8c94040e3f6e3faa95594241b5c9bd.tar.gz
pttbbs-4c6b03cc1c8c94040e3f6e3faa95594241b5c9bd.tar.bz2
pttbbs-4c6b03cc1c8c94040e3f6e3faa95594241b5c9bd.tar.lz
pttbbs-4c6b03cc1c8c94040e3f6e3faa95594241b5c9bd.tar.xz
pttbbs-4c6b03cc1c8c94040e3f6e3faa95594241b5c9bd.tar.zst
pttbbs-4c6b03cc1c8c94040e3f6e3faa95594241b5c9bd.zip
Remove magic numbers
git-svn-id: http://opensvn.csie.org/pttbbs/trunk@5825 63ad8ddf-47c3-0310-b6dd-a9e9d9715204
-rw-r--r--pttbbs/mbbsd/angel.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/pttbbs/mbbsd/angel.c b/pttbbs/mbbsd/angel.c
index 6a42981e..b796bdbb 100644
--- a/pttbbs/mbbsd/angel.c
+++ b/pttbbs/mbbsd/angel.c
@@ -514,6 +514,9 @@ int a_angelreport() {
rpt.total_online_angels,
rpt.total_active_angels);
+ if (!rpt.inactive_days)
+ rpt.inactive_days = 120;
+
prints(
"\t 絬ぱㄏい局Τ臘计ヘ程ぶ %d 程 %d \n"
"\t 絬秨Μぱㄏい臘程ぶ %d 程 %d \n"
@@ -522,13 +525,14 @@ int a_angelreport() {
rpt.max_masters_of_online_angels,
rpt.min_masters_of_active_angels,
rpt.max_masters_of_active_angels,
- rpt.inactive_days ? rpt.inactive_days : 120);
- if (!rpt.inactive_days)
- rpt.inactive_days = 120;
- int days = (now - 1361168062) / 86400 + 1;
+ rpt.inactive_days);
+#ifdef ANGELBEATS_ACTIVE_MASTER_RECORD_START
+ int days = (now - ANGELBEATS_ACTIVE_MASTER_RECORD_START) / DAY_SECONDS;
+ days += 1;
if (days < rpt.inactive_days)
prints("\t (パ臘琌穝糤参璸兜ヘ"
"ヘ玡龟悔Τ %d ぱず计沮)\n", days);
+#endif
prints("\n\t " ANSI_COLOR(1;33) "矗眶眤计沮Τ眤╬癘魁"
"ヴ種そ穦臩ō\n" ANSI_RESET);