diff options
author | piaip <piaip@63ad8ddf-47c3-0310-b6dd-a9e9d9715204> | 2007-12-28 13:28:06 +0800 |
---|---|---|
committer | piaip <piaip@63ad8ddf-47c3-0310-b6dd-a9e9d9715204> | 2007-12-28 13:28:06 +0800 |
commit | 2286d34c1de78415e1b838cdc071d1d8c56ccd80 (patch) | |
tree | 28e5ff2d4270545951802ea2ce0d28b7c366a782 | |
parent | 00c6a93e810cc0bac23af6edd59f3ce3b610fc4c (diff) | |
download | pttbbs-2286d34c1de78415e1b838cdc071d1d8c56ccd80.tar pttbbs-2286d34c1de78415e1b838cdc071d1d8c56ccd80.tar.gz pttbbs-2286d34c1de78415e1b838cdc071d1d8c56ccd80.tar.bz2 pttbbs-2286d34c1de78415e1b838cdc071d1d8c56ccd80.tar.lz pttbbs-2286d34c1de78415e1b838cdc071d1d8c56ccd80.tar.xz pttbbs-2286d34c1de78415e1b838cdc071d1d8c56ccd80.tar.zst pttbbs-2286d34c1de78415e1b838cdc071d1d8c56ccd80.zip |
- allow all non-guest user to use myfav (PERM_BASIC)
- add GLOBAL_NEWBIE and GLOBAL_SYSOP to default fav (for new registered user, not empty fav)
git-svn-id: http://opensvn.csie.org/pttbbs/trunk/pttbbs@3748 63ad8ddf-47c3-0310-b6dd-a9e9d9715204
-rw-r--r-- | include/config.h | 6 | ||||
-rw-r--r-- | include/proto.h | 1 | ||||
-rw-r--r-- | mbbsd/board.c | 415 | ||||
-rw-r--r-- | mbbsd/cal.c | 10 | ||||
-rw-r--r-- | mbbsd/edit.c | 2 | ||||
-rw-r--r-- | mbbsd/fav.c | 22 | ||||
-rw-r--r-- | mbbsd/mbbsd.c | 1 | ||||
-rw-r--r-- | sample/pttbbs.conf | 2 |
8 files changed, 252 insertions, 207 deletions
diff --git a/include/config.h b/include/config.h index 6f461fbf..05ad02b9 100644 --- a/include/config.h +++ b/include/config.h @@ -41,12 +41,16 @@ #define GLOBAL_BUGREPORT "SYSOP" #endif +#ifndef GLOBAL_SYSOP +#define "SYSOP" +#endif + #ifndef GLOBAL_LAW #define GLOBAL_LAW BBSMNAME "Law" #endif #ifndef GLOBAL_NEWBIE -#define GLOBAL_NEWBIE BBSMNAME "NewHand" +#define GLOBAL_NEWBIE BBSMNAME "Newhand" #endif #ifndef GLOBAL_NOTE diff --git a/include/proto.h b/include/proto.h index 916de0f4..f7a4467d 100644 --- a/include/proto.h +++ b/include/proto.h @@ -275,6 +275,7 @@ fav_t *get_fav_folder(fav_type_t *ft); fav_t *get_fav_root(void); int updatenewfav(int mode); void subscribe_newfav(void); +void reginit_fav(void); /* file */ int file_count_line(const char *file); diff --git a/mbbsd/board.c b/mbbsd/board.c index 66402831..a04cfa21 100644 --- a/mbbsd/board.c +++ b/mbbsd/board.c @@ -18,6 +18,9 @@ #define B_TOTAL(bptr) (SHM->total[(bptr)->bid - 1]) #define B_LASTPOSTTIME(bptr) (SHM->lastposttime[(bptr)->bid - 1]) #define B_BH(bptr) (&bcache[(bptr)->bid - 1]) + +#define HasFavEditPerm() HasUserPerm(PERM_BASIC) + typedef struct { int bid; unsigned char myattr; @@ -998,13 +1001,13 @@ brdlist_foot(void) { outs( ANSI_COLOR(34;46) " 選擇看板 " ANSI_COLOR(31;47) " (c)" ANSI_COLOR(30) "新文章模式 " - ANSI_COLOR(31) "(v/V)" ANSI_COLOR(30) "標記已讀/未讀 " - ANSI_COLOR(31) "(y)" ANSI_COLOR(30) "篩選"); + ANSI_COLOR(31) "(v/V)" ANSI_COLOR(30) "標為已讀/未讀 " + ANSI_COLOR(31) "(y)" ANSI_COLOR(30)); if(IS_LISTING_FAV()) - outs("最愛"); + outs("列出全部"); else if (IS_LISTING_BRD()) - outs("部份"); - else outs("全部"); + outs("篩選列表"); + else outs("篩選列表"); // never reach here? outslr(" " ANSI_COLOR(31) "(m)" ANSI_COLOR(30) "切換最愛", 73, ANSI_RESET, 0); @@ -1076,11 +1079,11 @@ show_brdlist(int head, int clsflag, int newflag) // (a) or (i) needs HasUserPerm(PERM_LOGINOK)). // 3 = first line of empty area - if (!HasUserPerm(PERM_LOGINOK)) + if (!HasFavEditPerm()) { // TODO actually we cannot use 's' (for PTT)... mouts(3, 10, - "--- 註冊完成的使用者才能新增看板喔 (可按 s 手動選取) ---"); + "--- 註冊的使用者才能新增看板喔 (可按 s 手動選取) ---"); } else { // normal user. tell him what to do. mouts(3, 10, @@ -1308,10 +1311,28 @@ choose_board(int newflag) ch = cursor_key(3 + num - head, 0); switch (ch) { + + /////////////////////////////////////////////////////// + // General Hotkeys + /////////////////////////////////////////////////////// + + case 'h': + show_helpfile(fn_boardlisthelp); + show_brdlist(head, 1, newflag); + break; case Ctrl('W'): whereami(); head = -1; break; + + case 'c': + show_brdlist(head, 1, newflag ^= 1); + break; + case Ctrl('I'): + t_idle(); + show_brdlist(head, 1, newflag); + break; + case 'e': case KEY_LEFT: case EOF: @@ -1323,9 +1344,6 @@ choose_board(int newflag) ch = ' '; } break; - case 'c': - show_brdlist(head, 1, newflag ^= 1); - break; case KEY_PGUP: case 'P': case 'b': @@ -1347,10 +1365,6 @@ choose_board(int newflag) else num += p_lines; break; - case Ctrl('I'): - t_idle(); - show_brdlist(head, 1, newflag); - break; case KEY_UP: case 'p': case 'k': @@ -1416,17 +1430,7 @@ choose_board(int newflag) num = tmp; brdlist_foot(); break; - case 'F': - case 'f': - if (HasUserPerm(PERM_SYSOP)) { - getbcache(class_bid)->firstchild[cuser.uflag & BRDSORT_FLAG ? 1 : 0] = 0; - brdnum = -1; - } - break; - case 'h': - show_helpfile(fn_boardlisthelp); - show_brdlist(head, 1, newflag); - break; + case '/': getdata_buf(b_lines - 1, 0, "請輸入看板中文關鍵字:", keyword, sizeof(keyword), DOECHO); @@ -1447,29 +1451,136 @@ choose_board(int newflag) cuser.uflag ^= BRDSORT_FLAG; brdnum = -1; break; - case 'y': - if (HasUserPerm(PERM_LOGINOK)) { - if (get_current_fav() != NULL || !IS_LISTING_FAV()){ - if (cuser.userlevel) - yank_flag ^= 1; /* FAV <=> BRD */ + + + case 'v': + case 'V': + assert(0<=num && num<nbrdsize); + ptr = &nbrd[num]; + if(nbrd[num].bid < 0 || !HasBoardPerm(B_BH(ptr))) + break; + if (ch == 'v') { + ptr->myattr &= ~NBRD_UNREAD; + brc_toggle_all_read(ptr->bid, 1); + } else { + brc_toggle_all_read(ptr->bid, 0); + ptr->myattr |= NBRD_UNREAD; + } + show_brdlist(head, 0, newflag); + break; + case 's': + if ((tmp = search_board()) == -1) { + show_brdlist(head, 1, newflag); + break; + } + head = -1; + num = tmp; + break; + + case KEY_RIGHT: + case '\n': + case '\r': + case 'r': + { + if (IS_LISTING_FAV()) { + assert(nbrdsize>0); + if (get_fav_type(&nbrd[0]) == 0) + break; + assert(0<=num && num<nbrdsize); + ptr = &nbrd[num]; + if (ptr->myattr & NBRD_LINE) + break; + if (ptr->myattr & NBRD_FOLDER){ + int t = num; + num = 0; + fav_folder_in(ptr->bid); + choose_board(0); + fav_folder_out(); + num = t; + LIST_FAV(); // XXX press 'y' in fav makes yank_flag = LIST_BRD + brdnum = -1; + head = 9999; + break; + } + } else { + assert(0<=num && num<nbrdsize); + ptr = &nbrd[num]; + if (ptr->myattr & NBRD_SYMBOLIC) { + replace_link_by_target(ptr); + } + } + + assert(0<=ptr->bid-1 && ptr->bid-1<MAX_BOARD); + if (!(B_BH(ptr)->brdattr & BRD_GROUPBOARD)) { /* 非sub class */ + if (HasBoardPerm(B_BH(ptr))) { + brc_initial_board(B_BH(ptr)->brdname); + + if (newflag) { + setbdir(buf, currboard); + tmp = unread_position(buf, ptr); + head = tmp - t_lines / 2; + getkeep(buf, head > 1 ? head : 1, tmp + 1); + } + Read(); + check_newpost(ptr); + head = -1; + setutmpmode(newflag ? READNEW : READBRD); + } + } else { /* sub class */ + move(12, 1); + bidtmp = class_bid; + currmodetmp = currmode; + tmp1 = num; + num = 0; + if (!(B_BH(ptr)->brdattr & BRD_TOP)) + class_bid = ptr->bid; + else + class_bid = -1; /* 熱門群組用 */ + + if (!GROUPOP()) /* 如果還沒有小組長權限 */ + set_menu_BM(B_BH(ptr)->BM); + + if (now < B_BH(ptr)->bupdate) { + int mr = 0; + + setbfile(buf, B_BH(ptr)->brdname, fn_notes); + mr = more(buf, NA); + if (mr != -1 && mr != READ_NEXT) + pressanykey(); + } + tmp = currutmp->brc_id; + setutmpbid(ptr->bid); + free(nbrd); + nbrd = NULL; + nbrdsize = 0; + if (IS_LISTING_FAV()) { + LIST_BRD(); + choose_board(0); + LIST_FAV(); + } + else + choose_board(0); + currmode = currmodetmp; /* 離開板板後就把權限拿掉喔 */ + num = tmp1; + class_bid = bidtmp; + setutmpbid(tmp); + brdnum = -1; } - brdnum = -1; } break; - case 'D': - if (HasUserPerm(PERM_SYSOP) || - (HasUserPerm(PERM_SYSSUPERSUBOP) && GROUPOP())) { - assert(0<=num && num<nbrdsize); - ptr = &nbrd[num]; - if (ptr->myattr & NBRD_SYMBOLIC) { - if (getans("確定刪除連結?[N/y]") == 'y') - delete_symbolic_link(getbcache(ptr->bid), ptr->bid); + /////////////////////////////////////////////////////// + // MyFav Functionality (Require PERM_BASIC) + /////////////////////////////////////////////////////// + case 'y': + if (HasFavEditPerm()) { + if (get_current_fav() != NULL || !IS_LISTING_FAV()){ + yank_flag ^= 1; /* FAV <=> BRD */ } brdnum = -1; } break; case Ctrl('D'): - if (HasUserPerm(PERM_LOGINOK)) { + if (HasFavEditPerm()) { if (getans("刪除所有標記[N]?") == 'y'){ fav_remove_all_tagged_item(); brdnum = -1; @@ -1477,13 +1588,13 @@ choose_board(int newflag) } break; case Ctrl('A'): - if (HasUserPerm(PERM_LOGINOK)) { + if (HasFavEditPerm()) { fav_add_all_tagged_item(); brdnum = -1; } break; case Ctrl('T'): - if (HasUserPerm(PERM_LOGINOK)) { + if (HasFavEditPerm()) { fav_remove_all_tag(); brdnum = -1; } @@ -1492,6 +1603,7 @@ choose_board(int newflag) if (paste_taged_brds(class_bid)) brdnum = -1; break; + case 'L': if ((HasUserPerm(PERM_SYSOP) || (HasUserPerm(PERM_SYSSUPERSUBOP) && GROUPOP())) && IN_CLASS()) { @@ -1500,7 +1612,7 @@ choose_board(int newflag) brdnum = -1; head = 9999; } - else if (HasUserPerm(PERM_LOGINOK) && IS_LISTING_FAV()) { + else if (HasFavEditPerm() && IS_LISTING_FAV()) { if (fav_add_line() == NULL) { vmsg("新增失敗,分隔線/總最愛 數量達最大值。"); break; @@ -1513,17 +1625,10 @@ choose_board(int newflag) head = 9999; } break; -/* - case 'l': - if (HasUserPerm(PERM_SYSOP) && (nbrd[num].myattr & NBRD_SYMBOLIC)) { - replace_link_by_target(&nbrd[num]); - head = 9999; - } - break; -*/ + case 'z': case 'm': - if (HasUserPerm(PERM_LOGINOK)) { + if (HasFavEditPerm()) { assert(0<=num && num<nbrdsize); ptr = &nbrd[num]; if (IS_LISTING_FAV()) { @@ -1551,7 +1656,7 @@ choose_board(int newflag) } break; case 'M': - if (HasUserPerm(PERM_LOGINOK)){ + if (HasFavEditPerm()){ if (IN_FAVORITE() && IS_LISTING_FAV()){ imovefav(num); brdnum = -1; @@ -1560,7 +1665,7 @@ choose_board(int newflag) } break; case 'g': - if (HasUserPerm(PERM_LOGINOK) && IS_LISTING_FAV()) { + if (HasFavEditPerm() && IS_LISTING_FAV()) { fav_type_t *ft; if (fav_stack_full()){ vmsg("目錄已達最大層數!!"); @@ -1581,7 +1686,7 @@ choose_board(int newflag) break; case 'T': assert(0<=num && num<nbrdsize); - if (HasUserPerm(PERM_LOGINOK) && nbrd[num].myattr & NBRD_FOLDER) { + if (HasFavEditPerm() && nbrd[num].myattr & NBRD_FOLDER) { fav_type_t *ft = getfolder(nbrd[num].bid); strlcpy(buf, get_item_title(ft), sizeof(buf)); getdata_buf(b_lines - 1, 0, "請輸入板名:", buf, 65, DOECHO); @@ -1590,7 +1695,7 @@ choose_board(int newflag) } break; case 'K': - if (HasUserPerm(PERM_LOGINOK)) { + if (HasFavEditPerm()) { char c, fname[80]; if (get_current_fav() != get_fav_root()) { vmsg("請到我的最愛最上層執行本功\能"); @@ -1625,64 +1730,9 @@ choose_board(int newflag) } break; - case 'v': - case 'V': - assert(0<=num && num<nbrdsize); - ptr = &nbrd[num]; - if(nbrd[num].bid < 0 || !HasBoardPerm(B_BH(ptr))) - break; - if (ch == 'v') { - ptr->myattr &= ~NBRD_UNREAD; - brc_toggle_all_read(ptr->bid, 1); - } else { - brc_toggle_all_read(ptr->bid, 0); - ptr->myattr |= NBRD_UNREAD; - } - show_brdlist(head, 0, newflag); - break; - case 's': - if ((tmp = search_board()) == -1) { - show_brdlist(head, 1, newflag); - break; - } - head = -1; - num = tmp; - break; - case 'E': - if (HasUserPerm(PERM_SYSOP | PERM_BOARD) || GROUPOP()) { - assert(0<=num && num<nbrdsize); - ptr = &nbrd[num]; - move(1, 1); - clrtobot(); - m_mod_board(B_BH(ptr)->brdname); - brdnum = -1; - } - break; - case 'R': - if (HasUserPerm(PERM_SYSOP) || GROUPOP()) { - m_newbrd(class_bid, 1); - brdnum = -1; - } - break; - case 'B': - if (HasUserPerm(PERM_SYSOP) || GROUPOP()) { - m_newbrd(class_bid, 0); - brdnum = -1; - } - break; - case 'W': - if (IN_SUBCLASS() && - (HasUserPerm(PERM_SYSOP) || GROUPOP())) { - setbpath(buf, getbcache(class_bid)->brdname); - mkdir(buf, 0755); /* Ptt:開群組目錄 */ - b_note_edit_bname(class_bid); - brdnum = -1; - } - break; - case 'a': case 'i': - if(IS_LISTING_FAV() && HasUserPerm(PERM_LOGINOK)){ + if(IS_LISTING_FAV() && HasFavEditPerm()){ char bname[IDLEN + 1]; int bid; move(0, 0); @@ -1720,7 +1770,7 @@ choose_board(int newflag) break; case 'w': - /* allowing save once per 10 minutes */ + /* allowing save BRC/fav once per 10 minutes */ if (now - last_save_fav_and_brc > 10 * 60) { fav_save(); brc_finalize(); @@ -1729,96 +1779,61 @@ choose_board(int newflag) } break; - case KEY_RIGHT: - case '\n': - case '\r': - case 'r': - { - if (IS_LISTING_FAV()) { - assert(nbrdsize>0); - if (get_fav_type(&nbrd[0]) == 0) - break; - assert(0<=num && num<nbrdsize); - ptr = &nbrd[num]; - if (ptr->myattr & NBRD_LINE) - break; - if (ptr->myattr & NBRD_FOLDER){ - int t = num; - num = 0; - fav_folder_in(ptr->bid); - choose_board(0); - fav_folder_out(); - num = t; - LIST_FAV(); // XXX press 'y' in fav makes yank_flag = LIST_BRD - brdnum = -1; - head = 9999; - break; - } - } else { - assert(0<=num && num<nbrdsize); - ptr = &nbrd[num]; - if (ptr->myattr & NBRD_SYMBOLIC) { - replace_link_by_target(ptr); - } - } - - assert(0<=ptr->bid-1 && ptr->bid-1<MAX_BOARD); - if (!(B_BH(ptr)->brdattr & BRD_GROUPBOARD)) { /* 非sub class */ - if (HasBoardPerm(B_BH(ptr))) { - brc_initial_board(B_BH(ptr)->brdname); + /////////////////////////////////////////////////////// + // Administrator Only + /////////////////////////////////////////////////////// - if (newflag) { - setbdir(buf, currboard); - tmp = unread_position(buf, ptr); - head = tmp - t_lines / 2; - getkeep(buf, head > 1 ? head : 1, tmp + 1); - } - Read(); - check_newpost(ptr); - head = -1; - setutmpmode(newflag ? READNEW : READBRD); - } - } else { /* sub class */ - move(12, 1); - bidtmp = class_bid; - currmodetmp = currmode; - tmp1 = num; - num = 0; - if (!(B_BH(ptr)->brdattr & BRD_TOP)) - class_bid = ptr->bid; - else - class_bid = -1; /* 熱門群組用 */ - - if (!GROUPOP()) /* 如果還沒有小組長權限 */ - set_menu_BM(B_BH(ptr)->BM); - - if (now < B_BH(ptr)->bupdate) { - int mr = 0; - - setbfile(buf, B_BH(ptr)->brdname, fn_notes); - mr = more(buf, NA); - if (mr != -1 && mr != READ_NEXT) - pressanykey(); - } - tmp = currutmp->brc_id; - setutmpbid(ptr->bid); - free(nbrd); - nbrd = NULL; - nbrdsize = 0; - if (IS_LISTING_FAV()) { - LIST_BRD(); - choose_board(0); - LIST_FAV(); - } - else - choose_board(0); - currmode = currmodetmp; /* 離開板板後就把權限拿掉喔 */ - num = tmp1; - class_bid = bidtmp; - setutmpbid(tmp); - brdnum = -1; + case 'F': + case 'f': + if (HasUserPerm(PERM_SYSOP)) { + getbcache(class_bid)->firstchild[cuser.uflag & BRDSORT_FLAG ? 1 : 0] = 0; + brdnum = -1; + } + break; + case 'D': + if (HasUserPerm(PERM_SYSOP) || + (HasUserPerm(PERM_SYSSUPERSUBOP) && GROUPOP())) { + assert(0<=num && num<nbrdsize); + ptr = &nbrd[num]; + if (ptr->myattr & NBRD_SYMBOLIC) { + if (getans("確定刪除連結?[N/y]") == 'y') + delete_symbolic_link(getbcache(ptr->bid), ptr->bid); } + brdnum = -1; + } + break; + case 'E': + if (HasUserPerm(PERM_SYSOP | PERM_BOARD) || GROUPOP()) { + assert(0<=num && num<nbrdsize); + ptr = &nbrd[num]; + move(1, 1); + clrtobot(); + m_mod_board(B_BH(ptr)->brdname); + brdnum = -1; + } + break; + case 'R': + if (HasUserPerm(PERM_SYSOP) || GROUPOP()) { + m_newbrd(class_bid, 1); + brdnum = -1; + } + break; + case 'B': + if (HasUserPerm(PERM_SYSOP) || GROUPOP()) { + m_newbrd(class_bid, 0); + brdnum = -1; } + break; + case 'W': + if (IN_SUBCLASS() && + (HasUserPerm(PERM_SYSOP) || GROUPOP())) { + setbpath(buf, getbcache(class_bid)->brdname); + mkdir(buf, 0755); /* Ptt:開群組目錄 */ + b_note_edit_bname(class_bid); + brdnum = -1; + } + break; + } } while (ch != 'q'); free(nbrd); diff --git a/mbbsd/cal.c b/mbbsd/cal.c index fb5c12e6..0ed5f2b6 100644 --- a/mbbsd/cal.c +++ b/mbbsd/cal.c @@ -466,22 +466,24 @@ p_sysinfo(void) getrusage(RUSAGE_SELF, &ru); prints("記憶體用量: " #ifdef IA32 - "sbrk: %d KB, " + "sbrk: %u KB, " #endif #ifdef __linux__ "VmData: %d KB, VmStk: %d KB, " #endif "idrss: %d KB, isrss: %d KB\n", #ifdef IA32 - ((int)sbrk(0) - 0x8048000) / 1024, + ((unsigned int)sbrk(0) - 0x8048000) / 1024, #endif #ifdef __linux__ vmdata, vmstk, #endif (int)ru.ru_idrss, (int)ru.ru_isrss); prints("CPU 用量: %ld.%06ldu %ld.%06lds", - ru.ru_utime.tv_sec, ru.ru_utime.tv_usec, - ru.ru_stime.tv_sec, ru.ru_stime.tv_usec); + (long int)ru.ru_utime.tv_sec, + (long int)ru.ru_utime.tv_usec, + (long int)ru.ru_stime.tv_sec, + (long int)ru.ru_stime.tv_usec); #ifdef CPULIMIT prints(" (limit %d secs)", (int)(CPULIMIT * 60)); #endif diff --git a/mbbsd/edit.c b/mbbsd/edit.c index fc31619f..dded10a9 100644 --- a/mbbsd/edit.c +++ b/mbbsd/edit.c @@ -1766,7 +1766,7 @@ write_file(char *fpath, int saveheader, int *islocal, char *mytitle, int upload) } else if (currstat == REEDIT #ifndef ALL_REEDIT_LOG - && strcmp(currboard, str_sysop) == 0 + && strcmp(currboard, GLOBAL_SYSOP) == 0 #endif ) { ptime = localtime4(&now); diff --git a/mbbsd/fav.c b/mbbsd/fav.c index b01ba1b9..fae372df 100644 --- a/mbbsd/fav.c +++ b/mbbsd/fav.c @@ -510,7 +510,7 @@ static int read_favrec(FILE *frp, fav_t *fp) /** * 從記錄檔中 load 出我的最愛。 - * TODO create default fav, and add SYSOP/PttNewHand + * TODO create default fav, and add SYSOP/PttNewHand (see reginit_fav) */ int fav_load(void) { @@ -1207,6 +1207,24 @@ void subscribe_newfav(void) updatenewfav(0); } +// create defaults for new user +void reginit_fav(void) +{ + int bid = 0; + + fav_load(); // for creating root + + bid = getbnum(GLOBAL_SYSOP); + if (bid > 0) fav_add_board(bid); + +#ifdef GLOBAL_NEWBIE + bid = getbnum(GLOBAL_NEWBIE); + if (bid > 0) fav_add_board(bid); +#endif + + fav_save(); +} + #if 1 // DEPRECATED typedef struct { char fid; @@ -1285,3 +1303,5 @@ static void fav4_read_favrec(FILE *frp, fav_t *fp) } } #endif + +// vim:ts=8:sw=4 diff --git a/mbbsd/mbbsd.c b/mbbsd/mbbsd.c index 114b6fdf..4d76d46f 100644 --- a/mbbsd/mbbsd.c +++ b/mbbsd/mbbsd.c @@ -717,6 +717,7 @@ login_query(void) #ifdef LOGINASNEW new_register(); mkuserdir(cuser.userid); + reginit_fav(); break; #else outs("本系統目前無法以 new 註冊, 請用 guest 進入\n"); diff --git a/sample/pttbbs.conf b/sample/pttbbs.conf index 7dea01e6..734bf743 100644 --- a/sample/pttbbs.conf +++ b/sample/pttbbs.conf @@ -41,6 +41,8 @@ /* 紀錄 */ #define GLOBAL_RECORD "Record" +/* SYSOP 板 */ +#define GLOBAL_SYSOP "SYSOP" /* 發生錯誤時建議的回報板名為此板 */ #define GLOBAL_BUGREPORT BBSMNAME "Bug" /* 法律訴訟的板 */ |