diff options
author | Teravus Ovares | 2007-11-13 22:48:19 +0000 |
---|---|---|
committer | Teravus Ovares | 2007-11-13 22:48:19 +0000 |
commit | 9f6b3e2357e76b9b85b447da189b4bf4163edd3c (patch) | |
tree | 7d9c39258e45e6271db953608e6868433f9ac70d /OpenSim/Region/Environment/Scenes/Scene.PacketHandlers.cs | |
parent | first pass on unlinking of objects. From Jay Clarke (IBM) (diff) | |
download | opensim-SC_OLD-9f6b3e2357e76b9b85b447da189b4bf4163edd3c.zip opensim-SC_OLD-9f6b3e2357e76b9b85b447da189b4bf4163edd3c.tar.gz opensim-SC_OLD-9f6b3e2357e76b9b85b447da189b4bf4163edd3c.tar.bz2 opensim-SC_OLD-9f6b3e2357e76b9b85b447da189b4bf4163edd3c.tar.xz |
* Added AvatarPicker in Standalone mode. Works for finding avatar to ban, manually trying to add a friend (with the add button) or useful to those who are curious which usernames have visited your standalone sim. Important for future development :D.
* Grid mode always returns 0 results until the Grid Communications portion is done.
Diffstat (limited to 'OpenSim/Region/Environment/Scenes/Scene.PacketHandlers.cs')
-rw-r--r-- | OpenSim/Region/Environment/Scenes/Scene.PacketHandlers.cs | 39 |
1 files changed, 39 insertions, 0 deletions
diff --git a/OpenSim/Region/Environment/Scenes/Scene.PacketHandlers.cs b/OpenSim/Region/Environment/Scenes/Scene.PacketHandlers.cs index 74e9a43..435022b 100644 --- a/OpenSim/Region/Environment/Scenes/Scene.PacketHandlers.cs +++ b/OpenSim/Region/Environment/Scenes/Scene.PacketHandlers.cs | |||
@@ -29,6 +29,7 @@ using System.Collections.Generic; | |||
29 | using libsecondlife; | 29 | using libsecondlife; |
30 | using libsecondlife.Packets; | 30 | using libsecondlife.Packets; |
31 | using OpenSim.Framework; | 31 | using OpenSim.Framework; |
32 | using OpenSim.Framework.UserManagement; | ||
32 | using OpenSim.Framework.Console; | 33 | using OpenSim.Framework.Console; |
33 | 34 | ||
34 | namespace OpenSim.Region.Environment.Scenes | 35 | namespace OpenSim.Region.Environment.Scenes |
@@ -155,5 +156,43 @@ namespace OpenSim.Region.Environment.Scenes | |||
155 | } | 156 | } |
156 | } | 157 | } |
157 | } | 158 | } |
159 | public void ProcessAvatarPickerRequest(IClientAPI client, LLUUID avatarID, LLUUID RequestID, string query) | ||
160 | { | ||
161 | //EventManager.TriggerAvatarPickerRequest(); | ||
162 | |||
163 | |||
164 | List<AvatarPickerAvatar> AvatarResponses = new List<AvatarPickerAvatar>(); | ||
165 | AvatarResponses = CommsManager.GenerateAgentPickerRequestResponse(RequestID, query); | ||
166 | |||
167 | AvatarPickerReplyPacket replyPacket = new AvatarPickerReplyPacket(); | ||
168 | AvatarPickerReplyPacket.DataBlock[] searchData = new AvatarPickerReplyPacket.DataBlock[AvatarResponses.Count]; | ||
169 | AvatarPickerReplyPacket.AgentDataBlock agentData = new AvatarPickerReplyPacket.AgentDataBlock(); | ||
170 | |||
171 | agentData.AgentID = avatarID; | ||
172 | agentData.QueryID = RequestID; | ||
173 | replyPacket.AgentData = agentData; | ||
174 | byte[] bytes = new byte[AvatarResponses.Count * 32]; | ||
175 | |||
176 | int i = 0; | ||
177 | foreach (AvatarPickerAvatar item in AvatarResponses) | ||
178 | { | ||
179 | LLUUID translatedIDtem = item.AvatarID; | ||
180 | searchData[i] = new AvatarPickerReplyPacket.DataBlock(); | ||
181 | searchData[i].AvatarID = translatedIDtem; | ||
182 | searchData[i].FirstName = Helpers.StringToField((string)item.firstName); | ||
183 | searchData[i].LastName = Helpers.StringToField((string)item.lastName); | ||
184 | i++; | ||
185 | |||
186 | } | ||
187 | if (AvatarResponses.Count == 0) | ||
188 | { | ||
189 | searchData = new AvatarPickerReplyPacket.DataBlock[0]; | ||
190 | } | ||
191 | replyPacket.Data = searchData; | ||
192 | client.SendAvatarPickerReply(replyPacket); | ||
193 | |||
194 | |||
195 | } | ||
196 | |||
158 | } | 197 | } |
159 | } \ No newline at end of file | 198 | } \ No newline at end of file |