aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Framework/Scenes/Scene.PacketHandlers.cs
diff options
context:
space:
mode:
authorMelanie2012-03-18 20:44:56 +0000
committerMelanie2012-03-18 20:44:56 +0000
commitc7e302864a2eef7f9587ed22286c96a6074ac5b3 (patch)
tree8f0df2f66811309fd790966770434fa3ff68bfdf /OpenSim/Region/Framework/Scenes/Scene.PacketHandlers.cs
parentMerge branch 'ubitwork' (diff)
parentAmend to previous commit: normalize strings ToLower. (diff)
downloadopensim-SC-c7e302864a2eef7f9587ed22286c96a6074ac5b3.zip
opensim-SC-c7e302864a2eef7f9587ed22286c96a6074ac5b3.tar.gz
opensim-SC-c7e302864a2eef7f9587ed22286c96a6074ac5b3.tar.bz2
opensim-SC-c7e302864a2eef7f9587ed22286c96a6074ac5b3.tar.xz
Merge branch 'master' into careminster
Conflicts: OpenSim/Region/CoreModules/World/Estate/EstateManagementModule.cs OpenSim/Region/Framework/Scenes/Scene.PacketHandlers.cs OpenSim/Region/Framework/Scenes/Scene.cs
Diffstat (limited to 'OpenSim/Region/Framework/Scenes/Scene.PacketHandlers.cs')
-rw-r--r--OpenSim/Region/Framework/Scenes/Scene.PacketHandlers.cs56
1 files changed, 0 insertions, 56 deletions
diff --git a/OpenSim/Region/Framework/Scenes/Scene.PacketHandlers.cs b/OpenSim/Region/Framework/Scenes/Scene.PacketHandlers.cs
index b006045..35ac908 100644
--- a/OpenSim/Region/Framework/Scenes/Scene.PacketHandlers.cs
+++ b/OpenSim/Region/Framework/Scenes/Scene.PacketHandlers.cs
@@ -341,62 +341,6 @@ namespace OpenSim.Region.Framework.Scenes
341 EventManager.TriggerObjectDeGrab(obj.RootPart.LocalId, part.LocalId, remoteClient, surfaceArg); 341 EventManager.TriggerObjectDeGrab(obj.RootPart.LocalId, part.LocalId, remoteClient, surfaceArg);
342 } 342 }
343 343
344 public void ProcessAvatarPickerRequest(IClientAPI client, UUID avatarID, UUID RequestID, string query)
345 {
346 //EventManager.TriggerAvatarPickerRequest();
347
348 List<UserAccount> accounts = UserAccountService.GetUserAccounts(RegionInfo.ScopeID, query);
349
350 if (accounts == null)
351 {
352 m_log.DebugFormat("[LLCIENT]: ProcessAvatarPickerRequest: returned null result");
353 return;
354 }
355
356 AvatarPickerReplyPacket replyPacket = (AvatarPickerReplyPacket) PacketPool.Instance.GetPacket(PacketType.AvatarPickerReply);
357 // TODO: don't create new blocks if recycling an old packet
358
359 AvatarPickerReplyPacket.DataBlock[] searchData =
360 new AvatarPickerReplyPacket.DataBlock[accounts.Count];
361 AvatarPickerReplyPacket.AgentDataBlock agentData = new AvatarPickerReplyPacket.AgentDataBlock();
362
363 agentData.AgentID = avatarID;
364 agentData.QueryID = RequestID;
365 replyPacket.AgentData = agentData;
366 //byte[] bytes = new byte[AvatarResponses.Count*32];
367
368 int i = 0;
369 foreach (UserAccount item in accounts)
370 {
371 UUID translatedIDtem = item.PrincipalID;
372 searchData[i] = new AvatarPickerReplyPacket.DataBlock();
373 searchData[i].AvatarID = translatedIDtem;
374 searchData[i].FirstName = Utils.StringToBytes((string) item.FirstName);
375 searchData[i].LastName = Utils.StringToBytes((string) item.LastName);
376 i++;
377 }
378 if (accounts.Count == 0)
379 {
380 searchData = new AvatarPickerReplyPacket.DataBlock[0];
381 }
382 replyPacket.Data = searchData;
383
384 AvatarPickerReplyAgentDataArgs agent_data = new AvatarPickerReplyAgentDataArgs();
385 agent_data.AgentID = replyPacket.AgentData.AgentID;
386 agent_data.QueryID = replyPacket.AgentData.QueryID;
387
388 List<AvatarPickerReplyDataArgs> data_args = new List<AvatarPickerReplyDataArgs>();
389 for (i = 0; i < replyPacket.Data.Length; i++)
390 {
391 AvatarPickerReplyDataArgs data_arg = new AvatarPickerReplyDataArgs();
392 data_arg.AvatarID = replyPacket.Data[i].AvatarID;
393 data_arg.FirstName = replyPacket.Data[i].FirstName;
394 data_arg.LastName = replyPacket.Data[i].LastName;
395 data_args.Add(data_arg);
396 }
397 client.SendAvatarPickerReply(agent_data, data_args);
398 }
399
400 public void ProcessScriptReset(IClientAPI remoteClient, UUID objectID, 344 public void ProcessScriptReset(IClientAPI remoteClient, UUID objectID,
401 UUID itemID) 345 UUID itemID)
402 { 346 {