From 9f968c8886542a57ef9a9c56730857252100acd7 Mon Sep 17 00:00:00 2001 From: ptt Date: Fri, 23 Apr 2004 03:19:01 +0000 Subject: debug of segfault on userlist git-svn-id: http://opensvn.csie.org/pttbbs/trunk/pttbbs@1821 63ad8ddf-47c3-0310-b6dd-a9e9d9715204 --- mbbsd/mbbsd.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'mbbsd/mbbsd.c') diff --git a/mbbsd/mbbsd.c b/mbbsd/mbbsd.c index 927a7333..d881c2b2 100644 --- a/mbbsd/mbbsd.c +++ b/mbbsd/mbbsd.c @@ -168,7 +168,7 @@ u_exit(char *mode) cuser.pager = currutmp->pager; memcpy(cuser.mind, currutmp->mind, 4); setutmpbid(0); - if (!(HAS_PERM(PERM_SYSOP) && HAS_PERM(PERM_DENYPOST)) && + if (!(HAS_PERM(PERM_SYSOP) && HAS_PERM(PERM_SYSOPHIDE)) && !currutmp->invisible) do_aloha("<<下站通知>> -- 我走囉!"); @@ -604,7 +604,7 @@ login_query() cuser.userlevel = PERM_BASIC | PERM_CHAT | PERM_PAGE | PERM_POST | PERM_LOGINOK | PERM_MAILLIMIT | PERM_CLOAK | PERM_SEECLOAK | PERM_XEMPT | - PERM_DENYPOST | PERM_BM | PERM_ACCOUNTS | + PERM_SYSOPHIDE | PERM_BM | PERM_ACCOUNTS | PERM_CHATROOM | PERM_BOARD | PERM_SYSOP | PERM_BBSADM; mkuserdir(cuser.userid); #endif @@ -949,7 +949,7 @@ user_login() SHM->max_time = now; } - if (!(HAS_PERM(PERM_SYSOP) && HAS_PERM(PERM_DENYPOST)) && + if (!(HAS_PERM(PERM_SYSOP) && HAS_PERM(PERM_SYSOPHIDE)) && !currutmp->invisible) do_aloha("<<上站通知>> -- 我來啦!"); -- cgit v1.2.3 From 91f6682a7690a4dd6ae160804b2009a0a98f8122 Mon Sep 17 00:00:00 2001 From: ptt Date: Fri, 23 Apr 2004 16:26:20 +0000 Subject: integrate igetkey igetch egetch git-svn-id: http://opensvn.csie.org/pttbbs/trunk/pttbbs@1828 63ad8ddf-47c3-0310-b6dd-a9e9d9715204 --- mbbsd/mbbsd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'mbbsd/mbbsd.c') diff --git a/mbbsd/mbbsd.c b/mbbsd/mbbsd.c index d881c2b2..41af43fb 100644 --- a/mbbsd/mbbsd.c +++ b/mbbsd/mbbsd.c @@ -424,7 +424,7 @@ write_request(int sig) memmove(&currutmp->msgs[0], &currutmp->msgs[1], sizeof(msgque_t) * currutmp->msgcount); - igetkey(); + igetch(); } } -- cgit v1.2.3 From 8e3a8b2bcaadc819bf4bfa5fd7d36d8701d2076c Mon Sep 17 00:00:00 2001 From: ptt Date: Fri, 23 Apr 2004 17:46:00 +0000 Subject: for foreigner git-svn-id: http://opensvn.csie.org/pttbbs/trunk/pttbbs@1831 63ad8ddf-47c3-0310-b6dd-a9e9d9715204 --- mbbsd/mbbsd.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'mbbsd/mbbsd.c') diff --git a/mbbsd/mbbsd.c b/mbbsd/mbbsd.c index 41af43fb..2b1db5a8 100644 --- a/mbbsd/mbbsd.c +++ b/mbbsd/mbbsd.c @@ -873,7 +873,7 @@ static void init_guest_info(void) currutmp->pager = 2; } -#ifdef FOREIGN_REG +#ifdef FOREIGN_REG_DAY inline static void foreign_warning(void){ if ((cuser.uflag2 & FOREIGN) && !(cuser.uflag2 & LIVERIGHT)){ if (login_start_time - cuser.firstlogin > (FOREIGN_REG_DAY - 5) * 24 * 3600){ @@ -981,7 +981,7 @@ user_login() if (!PERM_HIDE(currutmp)) cuser.lastlogin = login_start_time; -#ifdef FOREIGN_REG +#ifdef FOREIGN_REG_DAY foreign_warning(); #endif passwd_update(usernum, &cuser); -- cgit v1.2.3 From b282f3c6dca2a15ef4da7ee6c1f970e5ae926b67 Mon Sep 17 00:00:00 2001 From: ptt Date: Fri, 23 Apr 2004 20:14:20 +0000 Subject: reoragnize functions mprints, pprints -> mouts remove useless refresh, pressanykey(), sleep,... git-svn-id: http://opensvn.csie.org/pttbbs/trunk/pttbbs@1833 63ad8ddf-47c3-0310-b6dd-a9e9d9715204 --- mbbsd/mbbsd.c | 18 ++---------------- 1 file changed, 2 insertions(+), 16 deletions(-) (limited to 'mbbsd/mbbsd.c') diff --git a/mbbsd/mbbsd.c b/mbbsd/mbbsd.c index 2b1db5a8..fe8ad16c 100644 --- a/mbbsd/mbbsd.c +++ b/mbbsd/mbbsd.c @@ -182,18 +182,6 @@ u_exit(char *mode) log_usies(mode, NULL); } -void -system_abort() -{ - if (currmode) - u_exit("ABORT"); - - clear(); - refresh(); - fprintf(stdout, "謝謝光臨, 記得常來喔 !\n"); - exit(0); -} - void abort_bbs(int sig) { @@ -473,14 +461,12 @@ multi_user_check() log_usies("KICK ", cuser.username); } else { if (search_ulistn(usernum, 3) != NULL) - system_abort(); /* Goodbye(); */ + abort_bbs(); /* Goodbye(); */ } } else { /* allow multiple guest user */ if (search_ulistn(usernum, 100) != NULL) { - outs("\n抱歉,目前已有太多 guest 在站上, 請用new註冊。\n"); - pressanykey(); - oflush(); + vmsg("\n抱歉,目前已有太多 guest 在站上, 請用new註冊。\n"); exit(1); } } -- cgit v1.2.3 From a115db7e89c83779769f07044b4b3bb914bcef13 Mon Sep 17 00:00:00 2001 From: ptt Date: Fri, 23 Apr 2004 20:19:12 +0000 Subject: a little bug fixed git-svn-id: http://opensvn.csie.org/pttbbs/trunk/pttbbs@1834 63ad8ddf-47c3-0310-b6dd-a9e9d9715204 --- mbbsd/mbbsd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'mbbsd/mbbsd.c') diff --git a/mbbsd/mbbsd.c b/mbbsd/mbbsd.c index fe8ad16c..8cef890c 100644 --- a/mbbsd/mbbsd.c +++ b/mbbsd/mbbsd.c @@ -461,7 +461,7 @@ multi_user_check() log_usies("KICK ", cuser.username); } else { if (search_ulistn(usernum, 3) != NULL) - abort_bbs(); /* Goodbye(); */ + abort_bbs(0); /* Goodbye(); */ } } else { /* allow multiple guest user */ -- cgit v1.2.3