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 | |
parent | first pass on unlinking of objects. From Jay Clarke (IBM) (diff) | |
download | opensim-SC-9f6b3e2357e76b9b85b447da189b4bf4163edd3c.zip opensim-SC-9f6b3e2357e76b9b85b447da189b4bf4163edd3c.tar.gz opensim-SC-9f6b3e2357e76b9b85b447da189b4bf4163edd3c.tar.bz2 opensim-SC-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')
-rw-r--r-- | OpenSim/Region/Environment/Scenes/Scene.PacketHandlers.cs | 39 | ||||
-rw-r--r-- | OpenSim/Region/Environment/Scenes/Scene.cs | 5 | ||||
-rw-r--r-- | OpenSim/Region/Environment/Scenes/ScenePresence.cs | 4 |
3 files changed, 46 insertions, 2 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 |
diff --git a/OpenSim/Region/Environment/Scenes/Scene.cs b/OpenSim/Region/Environment/Scenes/Scene.cs index bf56fe8..d7e36c5 100644 --- a/OpenSim/Region/Environment/Scenes/Scene.cs +++ b/OpenSim/Region/Environment/Scenes/Scene.cs | |||
@@ -38,10 +38,10 @@ using OpenSim.Framework; | |||
38 | using OpenSim.Framework.Communications; | 38 | using OpenSim.Framework.Communications; |
39 | using OpenSim.Framework.Communications.Cache; | 39 | using OpenSim.Framework.Communications.Cache; |
40 | using OpenSim.Framework.Console; | 40 | using OpenSim.Framework.Console; |
41 | using OpenSim.Region.Environment.LandManagement; | ||
41 | using OpenSim.Framework.Servers; | 42 | using OpenSim.Framework.Servers; |
42 | using OpenSim.Region.Capabilities; | 43 | using OpenSim.Region.Capabilities; |
43 | using OpenSim.Region.Environment.Interfaces; | 44 | using OpenSim.Region.Environment.Interfaces; |
44 | using OpenSim.Region.Environment.LandManagement; | ||
45 | using OpenSim.Region.Environment.Modules; | 45 | using OpenSim.Region.Environment.Modules; |
46 | using OpenSim.Region.Environment.Scenes.Scripting; | 46 | using OpenSim.Region.Environment.Scenes.Scripting; |
47 | using OpenSim.Region.Environment.Types; | 47 | using OpenSim.Region.Environment.Types; |
@@ -732,7 +732,8 @@ namespace OpenSim.Region.Environment.Scenes | |||
732 | client.OnRemoveTaskItem += RemoveTaskInventory; | 732 | client.OnRemoveTaskItem += RemoveTaskInventory; |
733 | 733 | ||
734 | client.OnGrabObject += ProcessObjectGrab; | 734 | client.OnGrabObject += ProcessObjectGrab; |
735 | 735 | client.OnAvatarPickerRequest += ProcessAvatarPickerRequest; | |
736 | |||
736 | EventManager.TriggerOnNewClient(client); | 737 | EventManager.TriggerOnNewClient(client); |
737 | } | 738 | } |
738 | 739 | ||
diff --git a/OpenSim/Region/Environment/Scenes/ScenePresence.cs b/OpenSim/Region/Environment/Scenes/ScenePresence.cs index c9c24fe..3c6cad8 100644 --- a/OpenSim/Region/Environment/Scenes/ScenePresence.cs +++ b/OpenSim/Region/Environment/Scenes/ScenePresence.cs | |||
@@ -32,9 +32,11 @@ using libsecondlife; | |||
32 | using libsecondlife.Packets; | 32 | using libsecondlife.Packets; |
33 | using OpenSim.Framework; | 33 | using OpenSim.Framework; |
34 | using OpenSim.Framework.Console; | 34 | using OpenSim.Framework.Console; |
35 | using OpenSim.Framework.Communications; | ||
35 | using OpenSim.Region.Environment.Types; | 36 | using OpenSim.Region.Environment.Types; |
36 | using OpenSim.Region.Physics.Manager; | 37 | using OpenSim.Region.Physics.Manager; |
37 | 38 | ||
39 | |||
38 | namespace OpenSim.Region.Environment.Scenes | 40 | namespace OpenSim.Region.Environment.Scenes |
39 | { | 41 | { |
40 | public partial class ScenePresence : EntityBase | 42 | public partial class ScenePresence : EntityBase |
@@ -274,6 +276,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
274 | m_controllingClient.OnAgentRequestSit += HandleAgentRequestSit; | 276 | m_controllingClient.OnAgentRequestSit += HandleAgentRequestSit; |
275 | m_controllingClient.OnAgentSit += HandleAgentSit; | 277 | m_controllingClient.OnAgentSit += HandleAgentSit; |
276 | m_controllingClient.OnSetAlwaysRun += HandleSetAlwaysRun; | 278 | m_controllingClient.OnSetAlwaysRun += HandleSetAlwaysRun; |
279 | |||
277 | // ControllingClient.OnStartAnim += new StartAnim(this.SendAnimPack); | 280 | // ControllingClient.OnStartAnim += new StartAnim(this.SendAnimPack); |
278 | // ControllingClient.OnChildAgentStatus += new StatusChange(this.ChildStatusChange); | 281 | // ControllingClient.OnChildAgentStatus += new StatusChange(this.ChildStatusChange); |
279 | //ControllingClient.OnStopMovement += new GenericCall2(this.StopMovement); | 282 | //ControllingClient.OnStopMovement += new GenericCall2(this.StopMovement); |
@@ -1227,5 +1230,6 @@ namespace OpenSim.Region.Environment.Scenes | |||
1227 | { | 1230 | { |
1228 | m_controllingClient.SendWearables(m_wearables, m_wearablesSerial++); | 1231 | m_controllingClient.SendWearables(m_wearables, m_wearablesSerial++); |
1229 | } | 1232 | } |
1233 | |||
1230 | } | 1234 | } |
1231 | } | 1235 | } |