Пример #1
0
 public void SendDirPeopleReply(UUID queryID, DirPeopleReplyData[] data)
 {
 }
Пример #2
0
 public void SendDirPeopleReply(OpenMetaverse.UUID queryID, DirPeopleReplyData[] data)
 {
 }
Пример #3
0
 public void SendDirPeopleReply(UUID queryID, DirPeopleReplyData[] data)
 {
     throw new System.NotImplementedException();
 }
        public void DirPeopleQuery(IClientAPI remoteClient, UUID queryID,
                string queryText, uint queryFlags, int queryStart)
        {
            queryText = queryText.Trim();   // newer viewers sometimes append a space

            List<AvatarPickerAvatar> AvatarResponses =
                    new List<AvatarPickerAvatar>();
            AvatarResponses = m_Scenes[0].SceneGridService.
                    GenerateAgentPickerRequestResponse(queryID, queryText);

            DirPeopleReplyData[] data =
                    new DirPeopleReplyData[AvatarResponses.Count];

            int i = 0;
            foreach (AvatarPickerAvatar item in AvatarResponses)
            {
                data[i] = new DirPeopleReplyData();

                data[i].agentID = item.AvatarID;
                data[i].firstName = item.firstName;
                data[i].lastName = item.lastName;
                data[i].group = String.Empty;
                data[i].online = false;
                data[i].reputation = 0;
                i++;
            }

            remoteClient.SendDirPeopleReply(queryID, data);
        }
Пример #5
0
        public void DirPeopleQuery(IClientAPI remoteClient, UUID queryID,
									string queryText, uint queryFlags, int queryStart)
        {
            List<UserAccount> accounts = m_Scenes[0].UserAccountService.GetUserAccounts(m_Scenes[0].RegionInfo.ScopeID, queryText);

            DirPeopleReplyData[] data = new DirPeopleReplyData[accounts.Count];

            int i = 0;
            foreach (UserAccount item in accounts)
            {
                if ((item.UserFlags&0x01)==1) {
                    data[i] 			= new DirPeopleReplyData();
                    data[i].agentID 	= item.PrincipalID;
                    data[i].firstName 	= item.FirstName;
                    data[i].lastName  	= item.LastName;
                    data[i].group 	 	= "";
                    data[i].online 		= false;
                    data[i].reputation 	= 0;
                    i++;
                }
            }

            remoteClient.SendDirPeopleReply(queryID, data);
        }
Пример #6
0
        void OnDirFindQuery(IClientAPI remoteClient, UUID queryID, string queryText, uint queryFlags, int queryStart)
        {
            queryText = queryText.Trim();

            if (((DirFindFlags)queryFlags & DirFindFlags.People) == DirFindFlags.People)
            {
                if (string.IsNullOrEmpty(queryText))
                    remoteClient.SendDirPeopleReply(queryID, new DirPeopleReplyData[0]);

                List<UserAccount> accounts = m_Scenes[0].UserAccountService.GetUserAccounts(m_Scenes[0].RegionInfo.ScopeID, queryText);
                DirPeopleReplyData[] hits = new DirPeopleReplyData[accounts.Count];
                int i = 0;
                foreach (UserAccount acc in accounts)
                {
                    DirPeopleReplyData d = new DirPeopleReplyData();
                    d.agentID = acc.PrincipalID;
                    d.firstName = acc.FirstName;
                    d.lastName = acc.LastName;
                    d.online = false;

                    hits[i++] = d;
                }

                // TODO: This currently ignores pretty much all the query flags including Mature and sort order
                remoteClient.SendDirPeopleReply(queryID, hits);
            }
            else if (((DirFindFlags)queryFlags & DirFindFlags.Groups) == DirFindFlags.Groups)
            {
                if (m_GroupsService == null)
                {
                    m_log.Warn("[BASIC SEARCH MODULE]: Groups service is not available. Unable to search groups.");
                    remoteClient.SendAlertMessage("Groups search is not enabled");
                    return;
                }

                if (string.IsNullOrEmpty(queryText))
                    remoteClient.SendDirGroupsReply(queryID, new DirGroupsReplyData[0]);

                // TODO: This currently ignores pretty much all the query flags including Mature and sort order
                remoteClient.SendDirGroupsReply(queryID, m_GroupsService.FindGroups(remoteClient, queryText).ToArray());
            }

        }