static int full_user_list(struct user_info *uentp, struct fulluserlistarg* arg,int count){ struct user_info userinfo=*uentp; struct userec *lookupuser; zval* element; if (!userinfo.active || !userinfo.pid) { return 0; } if (!HAS_PERM(getCurrentUser(), PERM_SEECLOAK) && userinfo.invisible && strcmp(userinfo.userid, getCurrentUser()->userid)) { /*Haohmaru.99.4.24.让隐身者能看见自己 */ return 0; } if (count+1<arg->start) return COUNT; if (count+1-arg->start>=arg->num) return QUIT; MAKE_STD_ZVAL ( element ); array_init ( element ); add_assoc_bool ( element, "invisible", userinfo.invisible ); add_assoc_long ( element, "pid", userinfo.pid ); add_assoc_bool ( element, "isfriend", isfriend(userinfo.userid) ); add_assoc_string ( element, "userid", userinfo.userid, 1 ); add_assoc_string ( element, "username", userinfo.username, 1 ); if( getuser(userinfo.userid, &lookupuser) == 0 ) lookupuser=NULL; add_assoc_string ( element, "userfrom", HAS_PERM(getCurrentUser(), PERM_SYSOP)? userinfo.from: SHOW_USERIP(lookupuser, userinfo.from), 1 ); add_assoc_string ( element, "mode", ModeType(userinfo.mode), 1 ); add_assoc_long ( element, "idle", (long)(time(0) - userinfo.freshtime)/60 ); zend_hash_index_update(Z_ARRVAL_P(arg->return_value), count+1-arg->start, (void *) &element, sizeof(zval *), NULL); return COUNT;}