diff options
-rw-r--r-- | mbbsd/announce.c | 18 | ||||
-rw-r--r-- | mbbsd/mail.c | 2 | ||||
-rw-r--r-- | mbbsd/read.c | 11 | ||||
-rw-r--r-- | mbbsd/var.c | 4 |
4 files changed, 26 insertions, 9 deletions
diff --git a/mbbsd/announce.c b/mbbsd/announce.c index 92b89d7f..4dc5438e 100644 --- a/mbbsd/announce.c +++ b/mbbsd/announce.c @@ -1,4 +1,4 @@ -/* $Id: announce.c,v 1.31 2003/07/20 00:55:34 in2 Exp $ */ +/* $Id$ */ #include "bbs.h" #define PATHLEN 256 @@ -438,11 +438,18 @@ static int a_pastetagpost(menu_t * pm, int mode) { fileheader_t fhdr; + boardheader_t *bh; int ans = 0, ent = 0, tagnum; char title[TTLEN + 1] = "◇ "; char dirname[200], buf[200]; - setbdir(dirname, currboard); + if (TagBoard == 0){ + sethomedir(dirname, cuser.userid); + } + else{ + bh = getbcache(TagBoard); + setbdir(dirname, bh->brdname); + } tagnum = TagNum; if (!tagnum) @@ -450,7 +457,10 @@ a_pastetagpost(menu_t * pm, int mode) while (tagnum--) { EnumTagFhdr(&fhdr, dirname, ent++); - setbfile(buf, currboard, fhdr.filename); + if (TagBoard == 0) + sethomefile(buf, cuser.userid, fhdr.filename); + else + setbfile(buf, bh->brdname, fhdr.filename); if (dashf(buf)) { strncpy(title + 3, fhdr.title, TTLEN - 3); @@ -464,7 +474,7 @@ a_pastetagpost(menu_t * pm, int mode) ++ans; UnTagger(tagnum); } - }; + } return ans; } diff --git a/mbbsd/mail.c b/mbbsd/mail.c index ff434498..52c8884c 100644 --- a/mbbsd/mail.c +++ b/mbbsd/mail.c @@ -1,4 +1,4 @@ -/* $Id: mail.c,v 1.28 2003/07/20 00:55:34 in2 Exp $ */ +/* $Id$ */ #include "bbs.h" char currmaildir[32]; static char msg_cc[] = "\033[32m[群組名單]\033[m\n"; diff --git a/mbbsd/read.c b/mbbsd/read.c index 9cc2c398..d6260e12 100644 --- a/mbbsd/read.c +++ b/mbbsd/read.c @@ -720,6 +720,14 @@ i_read_key(onekey_t * rcmdlist, keeploc_t * locmem, int ch, int bid) /* rocker.011018: 採用新的tag模式 */ case 't': + /* 將原本在 Read() 裡面的 "TagNum = 0" 移至此處 */ + if (!(TagBoard == bid) && !(currstat & RMAIL && TagBoard == 0)) { + if (currstat & RMAIL) + TagBoard = 0; + else + TagBoard = bid; + TagNum = 0; + } /* rocker.011112: 解決再select mode標記文章的問題 */ if (Tagger(atoi(headers[locmem->crs_ln - locmem->top_ln].filename + 2), (currmode & MODE_SELECT) ? @@ -780,9 +788,6 @@ i_read(int cmdmode, char *direct, void (*dotitle) (), void (*doentry) (), onekey strlcpy(currdirect, direct, sizeof(currdirect)); mode = NEWDIRECT; - /* rocker.011018: 加入新的tag機制 */ - TagNum = 0; - do { /* 依據 mode 顯示 fileheader */ setutmpmode(cmdmode); diff --git a/mbbsd/var.c b/mbbsd/var.c index 7df518e5..9c2c443c 100644 --- a/mbbsd/var.c +++ b/mbbsd/var.c @@ -361,8 +361,10 @@ int brc_num; int brc_list[BRC_MAXNUM]; /* read.c */ -int TagNum; /* tag's number */ +int TagNum; /* tag's number */ TagItem TagList[MAXTAGS]; /* ascending list */ +int TagBoard = -1; /* TagBoard = 0 : user's mailbox + TagBoard > 0 : bid where last taged*/ char currdirect[64]; /* edit.c */ |