summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--mbbsd/admin.c13
-rw-r--r--mbbsd/board.c13
2 files changed, 13 insertions, 13 deletions
diff --git a/mbbsd/admin.c b/mbbsd/admin.c
index 88d3f181..5abb39da 100644
--- a/mbbsd/admin.c
+++ b/mbbsd/admin.c
@@ -258,6 +258,14 @@ setup_man(boardheader_t * board)
mkdir(genbuf, 0755);
}
+void delete_symbolic_link(boardheader_t *bh, int bid)
+{
+ memset(&bh, 0, sizeof(bh));
+ substitute_record(fn_board, &bh, sizeof(bh), bid);
+ reset_board(bid);
+ log_usies("DelLink", bh->brdname);
+}
+
int
m_mod_board(char *bname)
{
@@ -337,10 +345,7 @@ m_mod_board(char *bname)
if (genbuf[0] != 'y' || !bname[0])
outs(MSG_DEL_CANCEL);
else if (bh.brdattr & BRD_SYMBOLIC) {
- memset(&bh, 0, sizeof(bh));
- substitute_record(fn_board, &bh, sizeof(bh), bid);
- reset_board(bid);
- log_usies("DelLink", bh.brdname);
+ delete_symbolic_link(&bh, bid);
}
else {
strlcpy(bname, bh.brdname, sizeof(bh.brdname));
diff --git a/mbbsd/board.c b/mbbsd/board.c
index 66644967..bfc602ed 100644
--- a/mbbsd/board.c
+++ b/mbbsd/board.c
@@ -805,6 +805,10 @@ choose_board(int newflag)
yank_flag = (yank_flag + 1) % 2;
brdnum = -1;
break;
+ case 'D':
+ ptr = &nbrd[num];
+ delete_symbolic_link(&bcache[ptr->bid - 1], ptr->bid);
+ break;
case Ctrl('D'):
if (HAS_PERM(PERM_LOGINOK)) {
fav_remove_all_tagged_item();
@@ -977,15 +981,6 @@ choose_board(int newflag)
if (HAS_PERM(PERM_LOGINOK))
vmsg("嘿嘿 這個功\能已經被我的最愛取代掉了喔!");
break;
-#ifdef DEBUG
- case 'A':
- if (1) {
- char genbuf[200];
- sprintf(genbuf, "brdnum: %d num: %d", brdnum, num);
- vmsg(genbuf);
- }
- break;
-#endif
case 'Z':
if (HAS_PERM(PERM_LOGINOK)) {
char genbuf[256];