diff options
-rw-r--r-- | include/pttstruct.h | 5 | ||||
-rw-r--r-- | mbbsd/mbbsd.c | 7 | ||||
-rw-r--r-- | util/shmctl.c | 4 |
3 files changed, 9 insertions, 7 deletions
diff --git a/include/pttstruct.h b/include/pttstruct.h index 5ea7e799..2e3e5492 100644 --- a/include/pttstruct.h +++ b/include/pttstruct.h @@ -1,4 +1,4 @@ -/* $Id: pttstruct.h,v 1.32 2003/04/07 03:55:17 in2 Exp $ */ +/* $Id: pttstruct.h,v 1.33 2003/04/07 08:08:47 in2 Exp $ */ #ifndef INCLUDE_STRUCT_H #define INCLUDE_STRUCT_H @@ -353,7 +353,8 @@ typedef struct { union { int v[192]; struct { - int dyactive; + int dymaxactive; + int toomanyusers; } e; } GV2; char gap3_2[128]; diff --git a/mbbsd/mbbsd.c b/mbbsd/mbbsd.c index 97ba847a..6eade791 100644 --- a/mbbsd/mbbsd.c +++ b/mbbsd/mbbsd.c @@ -1,4 +1,4 @@ -/* $Id: mbbsd.c,v 1.69 2003/03/28 14:15:20 in2 Exp $ */ +/* $Id: mbbsd.c,v 1.70 2003/04/07 08:08:47 in2 Exp $ */ #include "bbs.h" #define SOCKET_QLEN 4 @@ -1342,10 +1342,11 @@ check_ban_and_load(int fd) } if (SHM->UTMPnumber >= MAX_ACTIVE #ifdef DYMAX_ACTIVE - || (GLOBALVAR[9] > 500 && SHM->UTMPnumber >= GLOBALVAR[9] ) + || (SHM->GV2.e.dymaxactive > 2000 && + SHM->UTMPnumber >= SHM->GV2.e.dymaxactive) #endif ) { - ++GLOBALVAR[8]; + ++SHM->GV2.e.toomanyusers; snprintf(buf, sizeof(buf), "由於人數過多,請您稍後再來。"); write(fd, buf, strlen(buf)); overload = 1; diff --git a/util/shmctl.c b/util/shmctl.c index 1417c2b0..2232c42d 100644 --- a/util/shmctl.c +++ b/util/shmctl.c @@ -1,4 +1,4 @@ -/* $Id: shmctl.c,v 1.36 2003/04/07 03:55:30 in2 Exp $ */ +/* $Id: shmctl.c,v 1.37 2003/04/07 08:08:47 in2 Exp $ */ #include "bbs.h" #include <sys/wait.h> @@ -337,7 +337,7 @@ int utmpnum(int argc, char **argv) return 0; } -char *GV2str[] = {"dyactive", NULL}; +char *GV2str[] = {"dymaxactive", "toomanyusers", NULL}; int showglobal(int argc, char **argv) { int i; |