diff options
-rw-r--r-- | mbbsd/io.c | 3 | ||||
-rw-r--r-- | mbbsd/mbbsd.c | 7 | ||||
-rw-r--r-- | mbbsd/talk.c | 11 | ||||
-rw-r--r-- | mbbsd/var.c | 3 | ||||
-rw-r--r-- | mbbsd/xyz.c | 3 |
5 files changed, 10 insertions, 17 deletions
@@ -1,4 +1,4 @@ -/* $Id: io.c,v 1.12 2002/05/14 14:48:01 ptt Exp $ */ +/* $Id: io.c,v 1.13 2002/05/14 15:08:47 ptt Exp $ */ #include <stdio.h> #include <stdlib.h> #include <string.h> @@ -33,7 +33,6 @@ extern pid_t currpid; extern int errno; extern screenline_t *big_picture; extern int t_lines, t_columns; /* Screen size / width */ -extern int curr_idle_timeout; extern water_t water[6], *swater[5], *water_which; extern char water_usies; diff --git a/mbbsd/mbbsd.c b/mbbsd/mbbsd.c index 07f1b955..8ea6f8d1 100644 --- a/mbbsd/mbbsd.c +++ b/mbbsd/mbbsd.c @@ -1,4 +1,4 @@ -/* $Id: mbbsd.c,v 1.26 2002/05/13 10:00:17 ptt Exp $ */ +/* $Id: mbbsd.c,v 1.27 2002/05/14 15:08:48 ptt Exp $ */ #include <stdio.h> #include <string.h> #include <stdlib.h> @@ -38,7 +38,6 @@ extern int t_lines, t_columns; /* Screen size / width */ extern int b_lines; /* Screen bottom line number: t_lines-1 */ extern userinfo_t *currutmp; -extern int curr_idle_timeout; extern time_t now; static void do_aloha (char *hello); @@ -149,10 +148,6 @@ chkload (char *buf) #endif if (i > MAX_CPULOAD) return 1; - else if (i > MAX_CPULOAD / 2) - curr_idle_timeout = 10 * 60; - else - curr_idle_timeout = 30 * 60; return 0; } diff --git a/mbbsd/talk.c b/mbbsd/talk.c index 8937df3d..70fb4fd8 100644 --- a/mbbsd/talk.c +++ b/mbbsd/talk.c @@ -1,4 +1,4 @@ -/* $Id: talk.c,v 1.33 2002/05/13 03:20:04 ptt Exp $ */ +/* $Id: talk.c,v 1.34 2002/05/14 15:08:48 ptt Exp $ */ #include <stdio.h> #include <string.h> #include <errno.h> @@ -44,7 +44,6 @@ extern int talkrequest; extern char *msg_shortulist; extern char *msg_nobody; extern boardheader_t *bcache; -extern int curr_idle_timeout; extern userec_t cuser; extern userec_t xuser; extern time_t now; @@ -1708,9 +1707,11 @@ static void pickup_user(void) #ifdef SHOW_IDLE_TIME diff = freshtime - pklist[ch].ui->lastact; //diff = pklist[ch].idle; - if (diff > 1800) diff = 1800; /* Doma: 以免一大串的發呆時間 */ - /* in2: max 30'00 :P */ - if (diff > 0) + // if (diff > 1800) diff = 1800; /* Doma: 以免一大串的發呆時間 */ + // in2: max 30'00 :P Ptt:真實沒關係 + if (diff > 3600 ) + sprintf(buf,"%3ldH%02ld", diff / 3600, (diff/60) % 60); + else if (diff > 0) sprintf(buf, "%3ld'%02ld", diff / 60, diff % 60); else buf[0] = '\0'; diff --git a/mbbsd/var.c b/mbbsd/var.c index 6f531c21..866ce063 100644 --- a/mbbsd/var.c +++ b/mbbsd/var.c @@ -1,4 +1,4 @@ -/* $Id: var.c,v 1.2 2002/04/29 07:05:45 in2 Exp $ */ +/* $Id: var.c,v 1.3 2002/05/14 15:08:48 ptt Exp $ */ #include <stdio.h> #include <sys/types.h> #include "config.h" @@ -81,7 +81,6 @@ unsigned int currstat; int currmode = 0; int curredit = 0; int showansi = 1; -int curr_idle_timeout = IDLE_TIMEOUT; time_t login_start_time; userec_t cuser; /* current user structure */ userec_t xuser; /* lookup user structure */ diff --git a/mbbsd/xyz.c b/mbbsd/xyz.c index daa0116e..d880a178 100644 --- a/mbbsd/xyz.c +++ b/mbbsd/xyz.c @@ -1,4 +1,4 @@ -/* $Id: xyz.c,v 1.5 2002/05/13 03:20:04 ptt Exp $ */ +/* $Id: xyz.c,v 1.6 2002/05/14 15:08:48 ptt Exp $ */ #include <stdio.h> #include <stdlib.h> #include <string.h> @@ -20,7 +20,6 @@ extern int b_lines; /* Screen bottom line number: t_lines-1 */ extern char *BBSName; extern char fromhost[]; extern userinfo_t *currutmp; -extern int curr_idle_timeout; extern userec_t cuser; extern time_t now; /* 各種統計及相關資訊列表 */ |