diff options
author | ptt <ptt@63ad8ddf-47c3-0310-b6dd-a9e9d9715204> | 2004-04-23 11:19:01 +0800 |
---|---|---|
committer | ptt <ptt@63ad8ddf-47c3-0310-b6dd-a9e9d9715204> | 2004-04-23 11:19:01 +0800 |
commit | 9f968c8886542a57ef9a9c56730857252100acd7 (patch) | |
tree | b771ff4bf4d81586726230d181fc87836207a0b1 | |
parent | 592c2af2c653d8525e9809effb4dddb2b6d9ff96 (diff) | |
download | pttbbs-9f968c8886542a57ef9a9c56730857252100acd7.tar pttbbs-9f968c8886542a57ef9a9c56730857252100acd7.tar.gz pttbbs-9f968c8886542a57ef9a9c56730857252100acd7.tar.bz2 pttbbs-9f968c8886542a57ef9a9c56730857252100acd7.tar.lz pttbbs-9f968c8886542a57ef9a9c56730857252100acd7.tar.xz pttbbs-9f968c8886542a57ef9a9c56730857252100acd7.tar.zst pttbbs-9f968c8886542a57ef9a9c56730857252100acd7.zip |
debug of segfault on userlist
git-svn-id: http://opensvn.csie.org/pttbbs/trunk/pttbbs@1821 63ad8ddf-47c3-0310-b6dd-a9e9d9715204
-rw-r--r-- | include/perm.h | 5 | ||||
-rw-r--r-- | mbbsd/mbbsd.c | 6 | ||||
-rw-r--r-- | mbbsd/talk.c | 5 | ||||
-rw-r--r-- | mbbsd/user.c | 2 |
4 files changed, 10 insertions, 8 deletions
diff --git a/include/perm.h b/include/perm.h index 2d676bae..02c03d0f 100644 --- a/include/perm.h +++ b/include/perm.h @@ -11,7 +11,7 @@ #define PERM_CLOAK 000000000100 /* 目前隱形中 */ #define PERM_SEECLOAK 000000000200 /* 看見忍者 */ #define PERM_XEMPT 000000000400 /* 永久保留帳號 */ -#define PERM_DENYPOST 000000001000 /* 站長隱身術 */ +#define PERM_SYSOPHIDE 000000001000 /* 站長隱身術 */ #define PERM_BM 000000002000 /* 板主 */ #define PERM_ACCOUNTS 000000004000 /* 帳號總管 */ #define PERM_CHATROOM 000000010000 /* 聊天室總管 */ @@ -51,8 +51,7 @@ #define HAS_PERM(x) ((x) ? cuser.userlevel & (x) : 1) #define HAVE_PERM(x) (cuser.userlevel&(x)) -#define PERM_HIDE(u) ((u)->userlevel & PERM_SYSOP && \ - (u)->userlevel & PERM_DENYPOST) +#define PERM_HIDE(u) (u && (u)->userlevel & PERM_SYSOPHIDE) #define IS_BOARD(bptr) ((bptr)->brdname[0] && \ !((bptr)->brdattr & BRD_GROUPBOARD)) 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("<<上站通知>> -- 我來啦!"); diff --git a/mbbsd/talk.c b/mbbsd/talk.c index d667fb0a..3ad7e731 100644 --- a/mbbsd/talk.c +++ b/mbbsd/talk.c @@ -1741,6 +1741,7 @@ draw_pickup(int drawall, pickup_t * pickup, int pickup_way, int idletime; #endif +pressanykey(); if (drawall) { showtitle((cuser.uflag & FRIEND_FLAG) ? "好友列表" : "休閒聊天", BBSName); @@ -1759,13 +1760,14 @@ draw_pickup(int drawall, pickup_t * pickup, int pickup_way, "\033[31m(w)\033[30m水球 \033[31m(m)\033[30m寄信 \033[31m(h)" "\033[30m線上輔助 \033[m"); } +pressanykey(); move(1, 0); prints(" 排序:[%s] 上站人數:%-4d\033[1;32m我的朋友:%-3d" "\033[33m與我為友:%-3d\033[36m板友:%-4d\033[31m壞人:" "%-2d\033[m\n", msg_pickup_way[pickup_way], SHM->UTMPnumber, myfriend, friendme, currutmp->brc_id ? (bfriend + 1) : 0, badfriend); - +pressanykey(); for (i = 0, ch = page * nPickups + 1; i < nPickups; ++i, ++ch) { move(i + 3, 0); prints("a"); @@ -1855,6 +1857,7 @@ draw_pickup(int drawall, pickup_t * pickup, int pickup_way, ); refresh(); +pressanykey(); } } diff --git a/mbbsd/user.c b/mbbsd/user.c index 4a544620..4a531d10 100644 --- a/mbbsd/user.c +++ b/mbbsd/user.c @@ -1500,7 +1500,7 @@ u_list_CB(int num, userec_t * uentp) permstr[0] = 'S'; else if (level & PERM_ACCOUNTS) permstr[0] = 'A'; - else if (level & PERM_DENYPOST) + else if (level & PERM_SYSOPHIDE) permstr[0] = 'p'; if (level & (PERM_BOARD)) |