summaryrefslogtreecommitdiffstats
path: root/mbbsd
diff options
context:
space:
mode:
authorptt <ptt@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2004-10-02 09:44:38 +0800
committerptt <ptt@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2004-10-02 09:44:38 +0800
commitc7863de07e72fc49ec01baa02e96debe8f41ee2b (patch)
tree6383cc7088317da24dd7625db120bdb89cc15b17 /mbbsd
parent0fcf591ff42a089e8641aba900866b2708731bf3 (diff)
downloadpttbbs-c7863de07e72fc49ec01baa02e96debe8f41ee2b.tar
pttbbs-c7863de07e72fc49ec01baa02e96debe8f41ee2b.tar.gz
pttbbs-c7863de07e72fc49ec01baa02e96debe8f41ee2b.tar.bz2
pttbbs-c7863de07e72fc49ec01baa02e96debe8f41ee2b.tar.lz
pttbbs-c7863de07e72fc49ec01baa02e96debe8f41ee2b.tar.xz
pttbbs-c7863de07e72fc49ec01baa02e96debe8f41ee2b.tar.zst
pttbbs-c7863de07e72fc49ec01baa02e96debe8f41ee2b.zip
split no reply and solved
git-svn-id: http://opensvn.csie.org/pttbbs/trunk/pttbbs@2219 63ad8ddf-47c3-0310-b6dd-a9e9d9715204
Diffstat (limited to 'mbbsd')
-rw-r--r--mbbsd/bbs.c24
1 files changed, 18 insertions, 6 deletions
diff --git a/mbbsd/bbs.c b/mbbsd/bbs.c
index 707dd98f..4feb0089 100644
--- a/mbbsd/bbs.c
+++ b/mbbsd/bbs.c
@@ -182,9 +182,10 @@ readdoent(int num, fileheader_t * ent)
type = (type == ' ') ? 'm' : 'M';
else if (TagNum && !Tagger(atoi(ent->filename + 2), 0, TAG_NIN))
type = 'D';
-
else if (ent->filemode & FILE_SOLVED)
- type = 's';
+ type = (type == ' ') ? 's': 'S';
+ else if (ent->filemode & FILE_NOREPLY)
+ type = (type == ' ') ? 'r': 'R';
}
title = subject(mark = ent->title);
if (ent->filemode & FILE_VOTE)
@@ -887,7 +888,7 @@ do_reply(fileheader_t * fhdr)
static int
reply_post(int ent, fileheader_t * fhdr, char *direct)
{
- if (!CheckPostPerm() || (fhdr->filemode &FILE_SOLVED))
+ if (!CheckPostPerm() || (fhdr->filemode &FILE_NOREPLY))
return DONOTHING;
setdirpath(quote_file, direct, fhdr->filename);
do_reply(fhdr);
@@ -1079,7 +1080,7 @@ read_post(int ent, fileheader_t * fhdr, char *direct)
if (more_result) {
if(more_result == 999) {
- if (fhdr->filemode &FILE_SOLVED)
+ if (fhdr->filemode &FILE_NOREPLY)
vmsg("此篇文章不可回覆");
else if (CheckPostPerm()) {
strlcpy(quote_file, genbuf, sizeof(quote_file));
@@ -1302,7 +1303,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) || (currmode & MODE_BOARD)) {
+ if ((currmode & MODE_BOARD)) {
fhdr->filemode ^= FILE_SOLVED;
substitute_ref_record(direct, fhdr, ent);
return PART_REDRAW;
@@ -1311,6 +1312,17 @@ solve_post(int ent, fileheader_t * fhdr, char *direct)
}
static int
+no_reply(int ent, fileheader_t * fhdr, char *direct)
+{
+ if ((currmode & MODE_BOARD)) {
+ fhdr->filemode ^= FILE_NOREPLY;
+ substitute_ref_record(direct, fhdr, ent);
+ return PART_REDRAW;
+ }
+ return DONOTHING;
+}
+
+static int
recommend_cancel(int ent, fileheader_t * fhdr, char *direct)
{
char yn[5];
@@ -2368,7 +2380,7 @@ const onekey_t read_comms[] = {
#endif
NULL, // Ctrl('H')
board_digest, // Ctrl('I') KEY_TAB 9
- NULL, // Ctrl('J')
+ no_reply, // Ctrl('J')
NULL, // Ctrl('K')
NULL, // Ctrl('L')
NULL, // Ctrl('M')