summaryrefslogtreecommitdiffstats
path: root/mbbsd
diff options
context:
space:
mode:
authorptt <ptt@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2002-05-31 01:37:06 +0800
committerptt <ptt@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2002-05-31 01:37:06 +0800
commitb8b27d2bcd895e8414dcd8665fe50f3ad82feab4 (patch)
tree370093d0e11d448d0f0b2fe13107d31aa356fc6e /mbbsd
parentb3f1cdca4c85eb441129a0798f5cdea14852f439 (diff)
downloadpttbbs-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.c17
-rw-r--r--mbbsd/talk.c33
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) �U���@�� (##) ���� ## ���峹",
"(r)(��) �\\Ū���g�峹 ($) ����̫�@�g�峹",
"\01�i���R�O",
- "(tab)/z ��K�Ҧ�/��ذ� (a)(A) ��M�@��",
+ "(tab)/z ��K�Ҧ�/��ذ� (a/A)(^Q)��M�@��/�@�̸��",
"(b/f) �iŪ�Ƨѿ�/�ѻP��L (?)(/) ��M���D",
"(V/R) �벼/�d�ߧ벼���G (^W)(X) �ڦb����/���ˤ峹",
- "(x) ����峹���L�ݪO (=)/([]<>-+) ��M���g�峹/�D�D���\\Ū",
+ "(x)(w) ����峹/����y (=)/([]<>-+) ��M���g�峹/�D�D���\\Ū",
#ifdef INTERNET_EMAIL
"(F) �峹�H�^Internet�l�c (U) �N�峹 uuencode ��H�^�l�c",
#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 �G", uentp->userid);
+ my_write(uentp->pid, genbuf, uentp->userid, 0, NULL);
+ return 1;
+ }
+ return 0;
+}
static void userlist(void)
{
/* �ϥΪ̦W��:
@@ -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 �G", 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);