aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Environment/Scenes
diff options
context:
space:
mode:
authorTeravus Ovares2007-11-13 22:48:19 +0000
committerTeravus Ovares2007-11-13 22:48:19 +0000
commit9f6b3e2357e76b9b85b447da189b4bf4163edd3c (patch)
tree7d9c39258e45e6271db953608e6868433f9ac70d /OpenSim/Region/Environment/Scenes
parentfirst pass on unlinking of objects. From Jay Clarke (IBM) (diff)
downloadopensim-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')
-rw-r--r--OpenSim/Region/Environment/Scenes/Scene.PacketHandlers.cs39
-rw-r--r--OpenSim/Region/Environment/Scenes/Scene.cs5
-rw-r--r--OpenSim/Region/Environment/Scenes/ScenePresence.cs4
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;
29using libsecondlife; 29using libsecondlife;
30using libsecondlife.Packets; 30using libsecondlife.Packets;
31using OpenSim.Framework; 31using OpenSim.Framework;
32using OpenSim.Framework.UserManagement;
32using OpenSim.Framework.Console; 33using OpenSim.Framework.Console;
33 34
34namespace OpenSim.Region.Environment.Scenes 35namespace 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;
38using OpenSim.Framework.Communications; 38using OpenSim.Framework.Communications;
39using OpenSim.Framework.Communications.Cache; 39using OpenSim.Framework.Communications.Cache;
40using OpenSim.Framework.Console; 40using OpenSim.Framework.Console;
41using OpenSim.Region.Environment.LandManagement;
41using OpenSim.Framework.Servers; 42using OpenSim.Framework.Servers;
42using OpenSim.Region.Capabilities; 43using OpenSim.Region.Capabilities;
43using OpenSim.Region.Environment.Interfaces; 44using OpenSim.Region.Environment.Interfaces;
44using OpenSim.Region.Environment.LandManagement;
45using OpenSim.Region.Environment.Modules; 45using OpenSim.Region.Environment.Modules;
46using OpenSim.Region.Environment.Scenes.Scripting; 46using OpenSim.Region.Environment.Scenes.Scripting;
47using OpenSim.Region.Environment.Types; 47using 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;
32using libsecondlife.Packets; 32using libsecondlife.Packets;
33using OpenSim.Framework; 33using OpenSim.Framework;
34using OpenSim.Framework.Console; 34using OpenSim.Framework.Console;
35using OpenSim.Framework.Communications;
35using OpenSim.Region.Environment.Types; 36using OpenSim.Region.Environment.Types;
36using OpenSim.Region.Physics.Manager; 37using OpenSim.Region.Physics.Manager;
37 38
39
38namespace OpenSim.Region.Environment.Scenes 40namespace 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}