From f2ac108f484ad739dc251bf0b1f43f29e6dfc3c7 Mon Sep 17 00:00:00 2001
From: in2 <in2@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>
Date: Sat, 25 May 2002 03:33:43 +0000
Subject: fix bug - pickup who I reject (fast user list)

git-svn-id: http://opensvn.csie.org/pttbbs/pttbbs/trunk/pttbbs@212 63ad8ddf-47c3-0310-b6dd-a9e9d9715204
---
 mbbsd/talk.c | 23 +++++++++++++++--------
 1 file changed, 15 insertions(+), 8 deletions(-)

(limited to 'mbbsd')

diff --git a/mbbsd/talk.c b/mbbsd/talk.c
index cbbbe3df..73637afc 100644
--- a/mbbsd/talk.c
+++ b/mbbsd/talk.c
@@ -1,4 +1,4 @@
-/* $Id: talk.c,v 1.44 2002/05/25 00:58:13 in2 Exp $ */
+/* $Id: talk.c,v 1.45 2002/05/25 03:33:43 in2 Exp $ */
 #include <stdio.h>
 #include <string.h>
 #include <errno.h>
@@ -1527,12 +1527,13 @@ static void pickup_myfriend(pickup_t *friends, int *nGots,
     *myfriend = *friendme = 1;
     for( *nGots = i = 0 ; currutmp->friend_online[i] && i < MAX_FRIEND ; ++i ){
 	where = currutmp->friend_online[i] & 0xFFFFFF;
-	if( 0 <= where && where < MAX_ACTIVE               &&
-	    (uentp = &utmpshm->uinfo[where]) && uentp->pid &&
-	    uentp != currutmp                              &&
+	if( 0 <= where && where < MAX_ACTIVE                 &&
+	    (uentp = &utmpshm->uinfo[where]) && uentp->pid   &&
+	    uentp != currutmp                                &&
 	    isvisible_stat(currutmp, uentp,
 			   frstate =
-			   currutmp->friend_online[i] >> 24)
+			   currutmp->friend_online[i] >> 24) &&
+	    ( !(frstate & IRH) || ((frstate & IRH) && (frstate & IFH)) )
 	    ){
 	    friends[*nGots].ui = &utmpshm->uinfo[where];
 	    friends[*nGots].uoffset = where;
@@ -1751,9 +1752,15 @@ static void draw_pickup(int drawall, pickup_t *pickup, int pickup_way,
     }
 }
 
-static void pickup_user(void)
+static void userlist(void)
 {
-
+    /* �ϥΪ̦W��:
+       userlist()      : main loop
+       draw_pickup()   : show out screen
+       pickup()        : generate THIS PAGE pickup list
+       pickup_maxpages : return max pages number of all list
+       pickup_myfriend : pickup friend (from friend_online) and sort
+    */
     pickup_t        currpickup[MAXPICKUP];
     userinfo_t      *uentp;
     static  int     show_mode = 0;
@@ -2279,7 +2286,7 @@ int t_users(void)
     int stat0 = currstat;
 
     setutmpmode(LUSERS);
-    pickup_user();
+    userlist();
     currutmp->mode = mode0;
     currutmp->destuid = destuid0;
     currstat = stat0;
-- 
cgit v1.2.3