diff options
author | ptt <ptt@63ad8ddf-47c3-0310-b6dd-a9e9d9715204> | 2002-05-31 01:37:06 +0800 |
---|---|---|
committer | ptt <ptt@63ad8ddf-47c3-0310-b6dd-a9e9d9715204> | 2002-05-31 01:37:06 +0800 |
commit | b8b27d2bcd895e8414dcd8665fe50f3ad82feab4 (patch) | |
tree | 370093d0e11d448d0f0b2fe13107d31aa356fc6e /mbbsd | |
parent | b3f1cdca4c85eb441129a0798f5cdea14852f439 (diff) | |
download | pttbbs-b8b27d2bcd895e8414dcd8665fe50f3ad82feab4.tar pttbbs-b8b27d2bcd895e8414dcd8665fe50f3ad82feab4.tar.gz pttbbs-b8b27d2bcd895e8414dcd8665fe50f3ad82feab4.tar.bz2 pttbbs-b8b27d2bcd895e8414dcd8665fe50f3ad82feab4.tar.lz pttbbs-b8b27d2bcd895e8414dcd8665fe50f3ad82feab4.tar.xz pttbbs-b8b27d2bcd895e8414dcd8665fe50f3ad82feab4.tar.zst pttbbs-b8b27d2bcd895e8414dcd8665fe50f3ad82feab4.zip |
*** empty log message ***
git-svn-id: http://opensvn.csie.org/pttbbs/pttbbs/trunk/pttbbs@256 63ad8ddf-47c3-0310-b6dd-a9e9d9715204
Diffstat (limited to 'mbbsd')
-rw-r--r-- | mbbsd/bbs.c | 17 | ||||
-rw-r--r-- | mbbsd/talk.c | 33 |
2 files changed, 31 insertions, 19 deletions
diff --git a/mbbsd/bbs.c b/mbbsd/bbs.c index ed68b9c1..f4690469 100644 --- a/mbbsd/bbs.c +++ b/mbbsd/bbs.c @@ -1,4 +1,4 @@ -/* $Id: bbs.c,v 1.38 2002/05/30 17:04:59 ptt Exp $ */ +/* $Id: bbs.c,v 1.39 2002/05/30 17:37:06 ptt Exp $ */ #include <stdio.h> #include <stdlib.h> #include <string.h> @@ -676,7 +676,13 @@ int invalid_brdname(char *brd) { } return 0; } - +static int b_call_in(int ent, fileheader_t *fhdr, char *direct) { + userinfo_t *u=search_ulist (searchuser(fhdr->owner)); + if(u && + call_in(u,friend_stat(currutmp, u))) + return FULLUPDATE; + return DONOTHING; +} static void do_reply(fileheader_t *fhdr) { boardheader_t *bp; bp = getbcache(currbid); @@ -1756,10 +1762,10 @@ static char *board_help[] = { "(N)(PgDn) 下移一頁 (##) 跳到 ## 號文章", "(r)(→) 閱\讀此篇文章 ($) 跳到最後一篇文章", "\01進階命令", - "(tab)/z 文摘模式/精華區 (a)(A) 找尋作者", + "(tab)/z 文摘模式/精華區 (a/A)(^Q)找尋作者/作者資料", "(b/f) 展讀備忘錄/參與賭盤 (?)(/) 找尋標題", "(V/R) 投票/查詢投票結果 (^W)(X) 我在哪裡/推薦文章", - "(x) 轉錄文章到其他看板 (=)/([]<>-+) 找尋首篇文章/主題式閱\讀", + "(x)(w) 轉錄文章/丟水球 (=)/([]<>-+) 找尋首篇文章/主題式閱\讀", #ifdef INTERNET_EMAIL "(F) 文章寄回Internet郵箱 (U) 將文章 uuencode 後寄回郵箱", #endif @@ -1853,7 +1859,8 @@ struct onekey_t read_comms[] = { {'B', bh_title_edit}, {'W', b_notes_edit}, {'O', b_post_note}, - {'w', b_water_edit}, + {'K', b_water_edit}, + {'w', b_call_in}, {'v', visable_list_edit}, {'i', b_application}, {'o', can_vote_edit}, diff --git a/mbbsd/talk.c b/mbbsd/talk.c index 2ba53be4..e0cbefea 100644 --- a/mbbsd/talk.c +++ b/mbbsd/talk.c @@ -1,4 +1,4 @@ -/* $Id: talk.c,v 1.49 2002/05/30 15:53:28 lwms Exp $ */ +/* $Id: talk.c,v 1.50 2002/05/30 17:37:06 ptt Exp $ */ #include <stdio.h> #include <string.h> #include <errno.h> @@ -1750,6 +1750,21 @@ static void draw_pickup(int drawall, pickup_t *pickup, int pickup_way, } } +int call_in(userinfo_t *uentp, int fri_stat) +{ + char genbuf[60]; + if( HAS_PERM(PERM_LOGINOK) && + uentp->pid != currpid && + strcmp(uentp->userid, cuser.userid) != 0 && + (HAS_PERM(PERM_SYSOP) || + (uentp->pager != 3 && + (fri_stat & HFM || uentp->pager != 4))) ){ + sprintf(genbuf, "Call-In %s :", uentp->userid); + my_write(uentp->pid, genbuf, uentp->userid, 0, NULL); + return 1; + } + return 0; +} static void userlist(void) { /* 使用者名單: @@ -2040,7 +2055,7 @@ static void userlist(void) *ans == 'n') break; if( HAS_PERM(PERM_SYSOP) ){ - for( i = 0 ; i < utmpshm->number ; ++i ){ + for( i = 0 ; i < utmpshm->number && i<1000 ; ++i ){ uentp = utmpshm->sorted[utmpshm->currsorted][0][i]; if( uentp->pid && kill(uentp->pid, 0) != -1 ) my_write(uentp->pid, genbuf, @@ -2127,19 +2142,9 @@ static void userlist(void) break; case 'w': - if( HAS_PERM(PERM_LOGINOK) && - uentp->pid != currpid && - strcmp(uentp->userid, cuser.userid) != 0 && - (HAS_PERM(PERM_SYSOP) || - (uentp->pager != 3 && - (fri_stat & HFM || uentp->pager != 4))) ){ - cursor_show(offset + 3, 0); - sprintf(genbuf, "Call-In %s :", uentp->userid); - my_write(uentp->pid, genbuf, uentp->userid, 0, NULL); - redrawall = redraw = 1; - } + if(call_in(uentp,fri_stat)) + redrawall = redraw = 1; break; - case 'a': if( HAS_PERM(PERM_LOGINOK) ){ friend_add(uentp->userid, FRIEND_OVERRIDE); |