diff options
author | ptt <ptt@63ad8ddf-47c3-0310-b6dd-a9e9d9715204> | 2004-09-23 22:37:18 +0800 |
---|---|---|
committer | ptt <ptt@63ad8ddf-47c3-0310-b6dd-a9e9d9715204> | 2004-09-23 22:37:18 +0800 |
commit | 46318e907721f11256d245d42cd8e841e8765057 (patch) | |
tree | 18375c30f7d613818464343013f3046081586266 | |
parent | e84a29034ca2aaeedce5f2cd84e68264fb9a3b46 (diff) | |
download | pttbbs-46318e907721f11256d245d42cd8e841e8765057.tar pttbbs-46318e907721f11256d245d42cd8e841e8765057.tar.gz pttbbs-46318e907721f11256d245d42cd8e841e8765057.tar.bz2 pttbbs-46318e907721f11256d245d42cd8e841e8765057.tar.lz pttbbs-46318e907721f11256d245d42cd8e841e8765057.tar.xz pttbbs-46318e907721f11256d245d42cd8e841e8765057.tar.zst pttbbs-46318e907721f11256d245d42cd8e841e8765057.zip |
1. fix 1 make error
2. add perm_nocitizen
3. add no reply for FILE_SOLVE
git-svn-id: http://opensvn.csie.org/pttbbs/trunk/pttbbs@2210 63ad8ddf-47c3-0310-b6dd-a9e9d9715204
-rw-r--r-- | include/config.h | 4 | ||||
-rw-r--r-- | include/perm.h | 4 | ||||
-rw-r--r-- | include/pttstruct.h | 2 | ||||
-rw-r--r-- | mbbsd/announce.c | 2 | ||||
-rw-r--r-- | mbbsd/bbs.c | 8 | ||||
-rw-r--r-- | mbbsd/board.c | 2 | ||||
-rw-r--r-- | mbbsd/var.c | 2 | ||||
-rw-r--r-- | mbbsd/voteboard.c | 2 |
8 files changed, 14 insertions, 12 deletions
diff --git a/include/config.h b/include/config.h index 7b05978c..14b14d03 100644 --- a/include/config.h +++ b/include/config.h @@ -45,6 +45,10 @@ #define MAX_GUEST_LIFE (3 * 24 * 60 * 60) #endif +#ifndef MAX_EDIT_LINE +#define MAX_EDIT_LINE 2048 /* 文章最長編輯長度 */ +#endif + #ifndef MAX_LIFE /* 最長使用者保留時間(秒) */ #define MAX_LIFE (120 * 24 * 60 * 60) #endif diff --git a/include/perm.h b/include/perm.h index d2788a59..cf838044 100644 --- a/include/perm.h +++ b/include/perm.h @@ -20,16 +20,14 @@ #define PERM_BBSADM 000000100000 /* BBSADM */ #define PERM_NOTOP 000000200000 /* 不列入排行榜 */ #define PERM_VIOLATELAW 000000400000 /* 違法通緝中 */ - #ifdef PLAY_ANGEL #define PERM_ANGEL 000001000000 /* 有資格擔任小天使 */ #endif #define OLD_PERM_NOOUTMAIL 000001000000 /* 不接受站外的信 */ - #define PERM_NOREGCODE 000002000000 /*不允許認證碼註冊*/ #define PERM_VIEWSYSOP 000004000000 /* 視覺站長 */ #define PERM_LOGUSER 000010000000 /* 觀察使用者行蹤 */ -#define PERM_ANNOUNCE 000020000000 /* 精華區總整理權 */ +#define PERM_NOCITIZEN 000020000000 /* 搋奪公權 */ #define PERM_RELATION 000040000000 /* 公關組 */ #define PERM_SMG 000100000000 /* 特務組 */ #define PERM_PRG 000200000000 /* 程式組 */ diff --git a/include/pttstruct.h b/include/pttstruct.h index 135967ee..f6803dcc 100644 --- a/include/pttstruct.h +++ b/include/pttstruct.h @@ -211,7 +211,7 @@ typedef struct fileheader_t { #define FILE_DIGEST 0x4 /* digest */ #define FILE_HOLD 0x8 /* unused */ #define FILE_BOTTOM 0x8 /* push_bottom */ -#define FILE_SOLVED 0x10 /* problem solved, sysop only */ +#define FILE_SOLVED 0x10 /* problem solved, don't reply, sysop/BM only */ #define FILE_HIDE 0x20 /* hild */ #define FILE_BM 0x40 /* BM only */ #define FILE_MULTI 0x100 /* multi send for mail */ diff --git a/mbbsd/announce.c b/mbbsd/announce.c index e214963e..d837ba98 100644 --- a/mbbsd/announce.c +++ b/mbbsd/announce.c @@ -1077,7 +1077,7 @@ Announce() { setutmpmode(ANNOUNCE); a_menu(mytitle, "man", - ((HAS_PERM(PERM_SYSOP) || HAS_PERM(PERM_ANNOUNCE)) ? SYSOP : + ((HAS_PERM(PERM_SYSOP) ) ? SYSOP : NOBODY)); return 0; } diff --git a/mbbsd/bbs.c b/mbbsd/bbs.c index b98070d5..fd9e9d08 100644 --- a/mbbsd/bbs.c +++ b/mbbsd/bbs.c @@ -127,7 +127,8 @@ set_board(void) /* init basic perm, but post perm is checked on demand */ currmode = (currmode & (MODE_DIRTY | MODE_GROUPOP)) | MODE_STARTED; - if (HAS_PERM(PERM_ALLBOARD) || is_BM_cache(currbid)) { + if (!HAS_PERM(PERM_NOCITIZEN) && + (HAS_PERM(PERM_ALLBOARD) || is_BM_cache(currbid))) { currmode = currmode | MODE_BOARD | MODE_POST | MODE_POSTCHECKED; } } @@ -886,9 +887,8 @@ do_reply(fileheader_t * fhdr) static int reply_post(int ent, fileheader_t * fhdr, char *direct) { - if (!CheckPostPerm()) + if (!CheckPostPerm() || (fhdr->filemode &FILE_SOLVED)) return DONOTHING; - setdirpath(quote_file, direct, fhdr->filename); do_reply(fhdr); *quote_file = 0; @@ -1293,7 +1293,7 @@ edit_title(int ent, fileheader_t * fhdr, char *direct) static int solve_post(int ent, fileheader_t * fhdr, char *direct) { - if (HAS_PERM(PERM_SYSOP)) { + if (HAS_PERM(PERM_SYSOP) || (currmode & MODE_BOARD)) { fhdr->filemode ^= FILE_SOLVED; substitute_ref_record(direct, fhdr, ent); return PART_REDRAW; diff --git a/mbbsd/board.c b/mbbsd/board.c index 8dd2dd83..5834375b 100644 --- a/mbbsd/board.c +++ b/mbbsd/board.c @@ -581,7 +581,7 @@ static char * const choosebrdhelp[] = { static void set_menu_BM(char *BM) { - if (HAS_PERM(PERM_ALLBOARD) || is_BM(BM)) { + if (!HAS_PERM(PERM_NOCITIZEN) && (HAS_PERM(PERM_ALLBOARD) || is_BM(BM))) { currmode |= MODE_GROUPOP; cuser.userlevel |= PERM_SYSSUBOP; } diff --git a/mbbsd/var.c b/mbbsd/var.c index 8bcd145c..b3a0be6f 100644 --- a/mbbsd/var.c +++ b/mbbsd/var.c @@ -29,7 +29,7 @@ char * const str_permid[] = { "不允許\認證碼註冊", /* PERM_NOREGCODE */ "視覺站長", /* PERM_VIEWSYSOP */ "觀察使用者行蹤", /* PERM_LOGUSER */ - "精華區總整理權", /* PERM_Announce */ + "禠奪公權", /* PERM_NOCITIZEN */ "公關組", /* PERM_RELATION */ "特務組", /* PERM_SMG */ "程式組", /* PERM_PRG */ diff --git a/mbbsd/voteboard.c b/mbbsd/voteboard.c index ccbe1ef4..341f6911 100644 --- a/mbbsd/voteboard.c +++ b/mbbsd/voteboard.c @@ -20,7 +20,7 @@ do_voteboardreply(fileheader_t * fhdr) clear(); - if (!CheckPostPerm()) { + if (!CheckPostPerm()||HAS_PERM(PERM_NOCITIZEN)) { move(5, 10); vmsg("對不起,您目前無法在此發表文章!"); return; |