diff options
author | kcwu <kcwu@63ad8ddf-47c3-0310-b6dd-a9e9d9715204> | 2005-03-27 09:29:08 +0800 |
---|---|---|
committer | kcwu <kcwu@63ad8ddf-47c3-0310-b6dd-a9e9d9715204> | 2005-03-27 09:29:08 +0800 |
commit | 7e4a044df382f797fad46e8c860f48c7ae0c340a (patch) | |
tree | eb6780bd35895428cf22d541efb5219b0007e3e6 /mbbsd | |
parent | 2c7fbc6db478e30200474dca9b0b16718fed4c65 (diff) | |
download | pttbbs-7e4a044df382f797fad46e8c860f48c7ae0c340a.tar pttbbs-7e4a044df382f797fad46e8c860f48c7ae0c340a.tar.gz pttbbs-7e4a044df382f797fad46e8c860f48c7ae0c340a.tar.bz2 pttbbs-7e4a044df382f797fad46e8c860f48c7ae0c340a.tar.lz pttbbs-7e4a044df382f797fad46e8c860f48c7ae0c340a.tar.xz pttbbs-7e4a044df382f797fad46e8c860f48c7ae0c340a.tar.zst pttbbs-7e4a044df382f797fad46e8c860f48c7ae0c340a.zip |
more statistic
git-svn-id: http://opensvn.csie.org/pttbbs/trunk/pttbbs@2681 63ad8ddf-47c3-0310-b6dd-a9e9d9715204
Diffstat (limited to 'mbbsd')
-rw-r--r-- | mbbsd/bbs.c | 13 | ||||
-rw-r--r-- | mbbsd/mbbsd.c | 9 |
2 files changed, 22 insertions, 0 deletions
diff --git a/mbbsd/bbs.c b/mbbsd/bbs.c index 8fb5ebb2..256868ce 100644 --- a/mbbsd/bbs.c +++ b/mbbsd/bbs.c @@ -1157,6 +1157,19 @@ read_post(int ent, fileheader_t * fhdr, const char *direct) if ((more_result = more(genbuf, YEA)) == -1) return READ_SKIP; + { + int posttime=atoi(fhdr->filename+2); + if(posttime>now-12*3600) + STATINC(STAT_READPOST_12HR); + else if(posttime>now-1*86400) + STATINC(STAT_READPOST_1DAY); + else if(posttime>now-3*86400) + STATINC(STAT_READPOST_3DAY); + else if(posttime>now-7*86400) + STATINC(STAT_READPOST_7DAY); + else + STATINC(STAT_READPOST_OLD); + } brc_addlist(fhdr->filename); strncpy(currtitle, subject(fhdr->title), TTLEN); diff --git a/mbbsd/mbbsd.c b/mbbsd/mbbsd.c index 9a9b0ea7..d9f63df7 100644 --- a/mbbsd/mbbsd.c +++ b/mbbsd/mbbsd.c @@ -204,6 +204,15 @@ abort_bbs_debug(int sig) static int reentrant = 0; #endif + switch(sig) { + case SIGINT: STATINC(STAT_SIGINT); break; + case SIGQUIT: STATINC(STAT_SIGQUIT); break; + case SIGILL: STATINC(STAT_SIGILL); break; + case SIGABRT: STATINC(STAT_SIGABRT); break; + case SIGFPE: STATINC(STAT_SIGFPE); break; + case SIGBUS: STATINC(STAT_SIGBUS); break; + case SIGSEGV: STATINC(STAT_SIGSEGV); break; + } #define CRASH_MSG "\033[0m\r\n程式異常, 立刻斷線. 請洽 PttBug 板詳述你發生的問題.\n" /* NOTE: It's better to use signal-safe functions. Avoid to call * functions with global/static variable -- data may be corrupted */ |