aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Environment/Scenes/SceneCommunicationService.cs
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region/Environment/Scenes/SceneCommunicationService.cs')
-rw-r--r--OpenSim/Region/Environment/Scenes/SceneCommunicationService.cs70
1 files changed, 35 insertions, 35 deletions
diff --git a/OpenSim/Region/Environment/Scenes/SceneCommunicationService.cs b/OpenSim/Region/Environment/Scenes/SceneCommunicationService.cs
index f8c5814..9ff35c0 100644
--- a/OpenSim/Region/Environment/Scenes/SceneCommunicationService.cs
+++ b/OpenSim/Region/Environment/Scenes/SceneCommunicationService.cs
@@ -30,16 +30,16 @@ using System.Collections.Generic;
30using System.Net; 30using System.Net;
31using System.Reflection; 31using System.Reflection;
32using System.Threading; 32using System.Threading;
33using libsecondlife; 33using OpenMetaverse;
34using log4net; 34using log4net;
35using OpenSim.Framework; 35using OpenSim.Framework;
36using OpenSim.Framework.Communications; 36using OpenSim.Framework.Communications;
37 37
38namespace OpenSim.Region.Environment.Scenes 38namespace OpenSim.Region.Environment.Scenes
39{ 39{
40 public delegate void KillObjectDelegate(uint localID); 40 public delegate void KiPrimitiveDelegate(uint localID);
41 41
42 public delegate void RemoveKnownRegionsFromAvatarList(LLUUID avatarID, List<ulong> regionlst); 42 public delegate void RemoveKnownRegionsFromAvatarList(UUID avatarID, List<ulong> regionlst);
43 43
44 public class SceneCommunicationService //one instance per region 44 public class SceneCommunicationService //one instance per region
45 { 45 {
@@ -72,7 +72,7 @@ namespace OpenSim.Region.Environment.Scenes
72 private LogOffUser handlerLogOffUser = null; 72 private LogOffUser handlerLogOffUser = null;
73 private GetLandData handlerGetLandData = null; // OnGetLandData 73 private GetLandData handlerGetLandData = null; // OnGetLandData
74 74
75 public KillObjectDelegate KillObject; 75 public KiPrimitiveDelegate KiPrimitive;
76 public string _debugRegionName = String.Empty; 76 public string _debugRegionName = String.Empty;
77 77
78 public string debugRegionName 78 public string debugRegionName
@@ -158,7 +158,7 @@ namespace OpenSim.Region.Environment.Scenes
158 } 158 }
159 } 159 }
160 160
161 protected void GridLogOffUser(ulong regionHandle, LLUUID AgentID, LLUUID RegionSecret, string message) 161 protected void GridLogOffUser(ulong regionHandle, UUID AgentID, UUID RegionSecret, string message)
162 { 162 {
163 handlerLogOffUser = OnLogOffUser; 163 handlerLogOffUser = OnLogOffUser;
164 if (handlerLogOffUser != null) 164 if (handlerLogOffUser != null)
@@ -188,7 +188,7 @@ namespace OpenSim.Region.Environment.Scenes
188 return true; 188 return true;
189 } 189 }
190 190
191 protected void AgentCrossing(ulong regionHandle, LLUUID agentID, LLVector3 position, bool isFlying) 191 protected void AgentCrossing(ulong regionHandle, UUID agentID, Vector3 position, bool isFlying)
192 { 192 {
193 handlerAvatarCrossingIntoRegion = OnAvatarCrossingIntoRegion; 193 handlerAvatarCrossingIntoRegion = OnAvatarCrossingIntoRegion;
194 if (handlerAvatarCrossingIntoRegion != null) 194 if (handlerAvatarCrossingIntoRegion != null)
@@ -197,7 +197,7 @@ namespace OpenSim.Region.Environment.Scenes
197 } 197 }
198 } 198 }
199 199
200 protected bool IncomingPrimCrossing(ulong regionHandle, LLUUID primID, String objXMLData, int XMLMethod) 200 protected bool IncomingPrimCrossing(ulong regionHandle, UUID primID, String objXMLData, int XMLMethod)
201 { 201 {
202 handlerExpectPrim = OnExpectPrim; 202 handlerExpectPrim = OnExpectPrim;
203 if (handlerExpectPrim != null) 203 if (handlerExpectPrim != null)
@@ -211,7 +211,7 @@ namespace OpenSim.Region.Environment.Scenes
211 211
212 } 212 }
213 213
214 protected void PrimCrossing(ulong regionHandle, LLUUID primID, LLVector3 position, bool isPhysical) 214 protected void PrimCrossing(ulong regionHandle, UUID primID, Vector3 position, bool isPhysical)
215 { 215 {
216 handlerPrimCrossingIntoRegion = OnPrimCrossingIntoRegion; 216 handlerPrimCrossingIntoRegion = OnPrimCrossingIntoRegion;
217 if (handlerPrimCrossingIntoRegion != null) 217 if (handlerPrimCrossingIntoRegion != null)
@@ -220,7 +220,7 @@ namespace OpenSim.Region.Environment.Scenes
220 } 220 }
221 } 221 }
222 222
223 protected bool CloseConnection(ulong regionHandle, LLUUID agentID) 223 protected bool CloseConnection(ulong regionHandle, UUID agentID)
224 { 224 {
225 m_log.Info("[INTERREGION]: Incoming Agent Close Request for agent: " + agentID.ToString()); 225 m_log.Info("[INTERREGION]: Incoming Agent Close Request for agent: " + agentID.ToString());
226 handlerCloseAgentConnection = OnCloseAgentConnection; 226 handlerCloseAgentConnection = OnCloseAgentConnection;
@@ -315,9 +315,9 @@ namespace OpenSim.Region.Environment.Scenes
315 for (int i = 0; i < neighbours.Count; i++) 315 for (int i = 0; i < neighbours.Count; i++)
316 { 316 {
317 AgentCircuitData agent = avatar.ControllingClient.RequestClientInfo(); 317 AgentCircuitData agent = avatar.ControllingClient.RequestClientInfo();
318 agent.BaseFolder = LLUUID.Zero; 318 agent.BaseFolder = UUID.Zero;
319 agent.InventoryFolder = LLUUID.Zero; 319 agent.InventoryFolder = UUID.Zero;
320 agent.startpos = new LLVector3(128, 128, 70); 320 agent.startpos = new Vector3(128, 128, 70);
321 agent.child = true; 321 agent.child = true;
322 322
323 InformClientOfNeighbourDelegate d = InformClientOfNeighbourAsync; 323 InformClientOfNeighbourDelegate d = InformClientOfNeighbourAsync;
@@ -356,9 +356,9 @@ namespace OpenSim.Region.Environment.Scenes
356 public void InformNeighborChildAgent(ScenePresence avatar, RegionInfo region, List<RegionInfo> neighbours) 356 public void InformNeighborChildAgent(ScenePresence avatar, RegionInfo region, List<RegionInfo> neighbours)
357 { 357 {
358 AgentCircuitData agent = avatar.ControllingClient.RequestClientInfo(); 358 AgentCircuitData agent = avatar.ControllingClient.RequestClientInfo();
359 agent.BaseFolder = LLUUID.Zero; 359 agent.BaseFolder = UUID.Zero;
360 agent.InventoryFolder = LLUUID.Zero; 360 agent.InventoryFolder = UUID.Zero;
361 agent.startpos = new LLVector3(128, 128, 70); 361 agent.startpos = new Vector3(128, 128, 70);
362 agent.child = true; 362 agent.child = true;
363 363
364 InformClientOfNeighbourDelegate d = InformClientOfNeighbourAsync; 364 InformClientOfNeighbourDelegate d = InformClientOfNeighbourAsync;
@@ -484,13 +484,13 @@ namespace OpenSim.Region.Environment.Scenes
484 d); 484 d);
485 } 485 }
486 486
487 public delegate void SendCloseChildAgentDelegate(LLUUID agentID, List<ulong> regionlst); 487 public delegate void SendCloseChildAgentDelegate(UUID agentID, List<ulong> regionlst);
488 488
489 /// <summary> 489 /// <summary>
490 /// This Closes child agents on neighboring regions 490 /// This Closes child agents on neighboring regions
491 /// Calls an asynchronous method to do so.. so it doesn't lag the sim. 491 /// Calls an asynchronous method to do so.. so it doesn't lag the sim.
492 /// </summary> 492 /// </summary>
493 private void SendCloseChildAgentAsync(LLUUID agentID, List<ulong> regionlst) 493 private void SendCloseChildAgentAsync(UUID agentID, List<ulong> regionlst)
494 { 494 {
495 495
496 foreach (ulong regionHandle in regionlst) 496 foreach (ulong regionHandle in regionlst)
@@ -525,7 +525,7 @@ namespace OpenSim.Region.Environment.Scenes
525 icon.EndInvoke(iar); 525 icon.EndInvoke(iar);
526 } 526 }
527 527
528 public void SendCloseChildAgentConnections(LLUUID agentID, List<ulong> regionslst) 528 public void SendCloseChildAgentConnections(UUID agentID, List<ulong> regionslst)
529 { 529 {
530 // This assumes that we know what our neighbors are. 530 // This assumes that we know what our neighbors are.
531 SendCloseChildAgentDelegate d = SendCloseChildAgentAsync; 531 SendCloseChildAgentDelegate d = SendCloseChildAgentAsync;
@@ -550,7 +550,7 @@ namespace OpenSim.Region.Environment.Scenes
550 /// </summary> 550 /// </summary>
551 /// <param name="regionID"></param> 551 /// <param name="regionID"></param>
552 /// <returns></returns> 552 /// <returns></returns>
553 public virtual RegionInfo RequestNeighbouringRegionInfo(LLUUID regionID) 553 public virtual RegionInfo RequestNeighbouringRegionInfo(UUID regionID)
554 { 554 {
555 //m_log.Info("[INTER]: " + debugRegionName + ": SceneCommunicationService: Sending Grid Services Request about neighbor " + regionID); 555 //m_log.Info("[INTER]: " + debugRegionName + ": SceneCommunicationService: Sending Grid Services Request about neighbor " + regionID);
556 return m_commsProvider.GridService.RequestNeighbourInfo(regionID); 556 return m_commsProvider.GridService.RequestNeighbourInfo(regionID);
@@ -578,8 +578,8 @@ namespace OpenSim.Region.Environment.Scenes
578 /// <param name="position"></param> 578 /// <param name="position"></param>
579 /// <param name="lookAt"></param> 579 /// <param name="lookAt"></param>
580 /// <param name="flags"></param> 580 /// <param name="flags"></param>
581 public virtual void RequestTeleportToLocation(ScenePresence avatar, ulong regionHandle, LLVector3 position, 581 public virtual void RequestTeleportToLocation(ScenePresence avatar, ulong regionHandle, Vector3 position,
582 LLVector3 lookAt, uint flags) 582 Vector3 lookAt, uint flags)
583 { 583 {
584 bool destRegionUp = false; 584 bool destRegionUp = false;
585 585
@@ -588,7 +588,7 @@ namespace OpenSim.Region.Environment.Scenes
588 // Teleport within the same region 588 // Teleport within the same region
589 if (position.X < 0 || position.X > Constants.RegionSize || position.Y < 0 || position.Y > Constants.RegionSize || position.Z < 0) 589 if (position.X < 0 || position.X > Constants.RegionSize || position.Y < 0 || position.Y > Constants.RegionSize || position.Z < 0)
590 { 590 {
591 LLVector3 emergencyPos = new LLVector3(128, 128, 128); 591 Vector3 emergencyPos = new Vector3(128, 128, 128);
592 592
593 m_log.WarnFormat( 593 m_log.WarnFormat(
594 "[SCENE COMMUNICATION SERVICE]: RequestTeleportToLocation() was given an illegal position of {0} for avatar {1}, {2}. Substituting {3}", 594 "[SCENE COMMUNICATION SERVICE]: RequestTeleportToLocation() was given an illegal position of {0} for avatar {1}, {2}. Substituting {3}",
@@ -614,8 +614,8 @@ namespace OpenSim.Region.Environment.Scenes
614 { 614 {
615 avatar.ControllingClient.SendTeleportLocationStart(); 615 avatar.ControllingClient.SendTeleportLocationStart();
616 AgentCircuitData agent = avatar.ControllingClient.RequestClientInfo(); 616 AgentCircuitData agent = avatar.ControllingClient.RequestClientInfo();
617 agent.BaseFolder = LLUUID.Zero; 617 agent.BaseFolder = UUID.Zero;
618 agent.InventoryFolder = LLUUID.Zero; 618 agent.InventoryFolder = UUID.Zero;
619 agent.startpos = position; 619 agent.startpos = position;
620 agent.child = true; 620 agent.child = true;
621 621
@@ -667,9 +667,9 @@ namespace OpenSim.Region.Environment.Scenes
667 avatar.MakeChildAgent(); 667 avatar.MakeChildAgent();
668 Thread.Sleep(5000); 668 Thread.Sleep(5000);
669 avatar.CrossAttachmentsIntoNewRegion(reg.RegionHandle); 669 avatar.CrossAttachmentsIntoNewRegion(reg.RegionHandle);
670 if (KillObject != null) 670 if (KiPrimitive != null)
671 { 671 {
672 KillObject(avatar.LocalId); 672 KiPrimitive(avatar.LocalId);
673 } 673 }
674 uint newRegionX = (uint)(reg.RegionHandle >> 40); 674 uint newRegionX = (uint)(reg.RegionHandle >> 40);
675 uint newRegionY = (((uint)(reg.RegionHandle)) >> 8); 675 uint newRegionY = (((uint)(reg.RegionHandle)) >> 8);
@@ -700,12 +700,12 @@ namespace OpenSim.Region.Environment.Scenes
700 /// <param name="regionhandle"></param> 700 /// <param name="regionhandle"></param>
701 /// <param name="agentID"></param> 701 /// <param name="agentID"></param>
702 /// <param name="position"></param> 702 /// <param name="position"></param>
703 public bool CrossToNeighbouringRegion(ulong regionhandle, LLUUID agentID, LLVector3 position, bool isFlying) 703 public bool CrossToNeighbouringRegion(ulong regionhandle, UUID agentID, Vector3 position, bool isFlying)
704 { 704 {
705 return m_commsProvider.InterRegion.ExpectAvatarCrossing(regionhandle, agentID, position, isFlying); 705 return m_commsProvider.InterRegion.ExpectAvatarCrossing(regionhandle, agentID, position, isFlying);
706 } 706 }
707 707
708 public bool PrimCrossToNeighboringRegion(ulong regionhandle, LLUUID primID, string objData, int XMLMethod) 708 public bool PrimCrossToNeighboringRegion(ulong regionhandle, UUID primID, string objData, int XMLMethod)
709 { 709 {
710 return m_commsProvider.InterRegion.InformRegionOfPrimCrossing(regionhandle, primID, objData, XMLMethod); 710 return m_commsProvider.InterRegion.InformRegionOfPrimCrossing(regionhandle, primID, objData, XMLMethod);
711 } 711 }
@@ -716,32 +716,32 @@ namespace OpenSim.Region.Environment.Scenes
716 return m_commsProvider.GridService.GetGridSettings(); 716 return m_commsProvider.GridService.GetGridSettings();
717 } 717 }
718 718
719 public void LogOffUser(LLUUID userid, LLUUID regionid, ulong regionhandle, float posx, float posy, float posz) 719 public void LogOffUser(UUID userid, UUID regionid, ulong regionhandle, float posx, float posy, float posz)
720 { 720 {
721 m_commsProvider.LogOffUser(userid, regionid, regionhandle, posx, posy, posz); 721 m_commsProvider.LogOffUser(userid, regionid, regionhandle, posx, posy, posz);
722 } 722 }
723 723
724 public void ClearUserAgent(LLUUID avatarID) 724 public void ClearUserAgent(UUID avatarID)
725 { 725 {
726 m_commsProvider.UserService.ClearUserAgent(avatarID); 726 m_commsProvider.UserService.ClearUserAgent(avatarID);
727 } 727 }
728 728
729 public void AddNewUserFriend(LLUUID friendlistowner, LLUUID friend, uint perms) 729 public void AddNewUserFriend(UUID friendlistowner, UUID friend, uint perms)
730 { 730 {
731 m_commsProvider.AddNewUserFriend(friendlistowner, friend, perms); 731 m_commsProvider.AddNewUserFriend(friendlistowner, friend, perms);
732 } 732 }
733 733
734 public void UpdateUserFriendPerms(LLUUID friendlistowner, LLUUID friend, uint perms) 734 public void UpdateUserFriendPerms(UUID friendlistowner, UUID friend, uint perms)
735 { 735 {
736 m_commsProvider.UpdateUserFriendPerms(friendlistowner, friend, perms); 736 m_commsProvider.UpdateUserFriendPerms(friendlistowner, friend, perms);
737 } 737 }
738 738
739 public void RemoveUserFriend(LLUUID friendlistowner, LLUUID friend) 739 public void RemoveUserFriend(UUID friendlistowner, UUID friend)
740 { 740 {
741 m_commsProvider.RemoveUserFriend(friendlistowner, friend); 741 m_commsProvider.RemoveUserFriend(friendlistowner, friend);
742 } 742 }
743 743
744 public List<FriendListItem> GetUserFriendList(LLUUID friendlistowner) 744 public List<FriendListItem> GetUserFriendList(UUID friendlistowner)
745 { 745 {
746 return m_commsProvider.GetUserFriendList(friendlistowner); 746 return m_commsProvider.GetUserFriendList(friendlistowner);
747 } 747 }
@@ -751,7 +751,7 @@ namespace OpenSim.Region.Environment.Scenes
751 return m_commsProvider.GridService.RequestNeighbourMapBlocks(minX, minY, maxX, maxY); 751 return m_commsProvider.GridService.RequestNeighbourMapBlocks(minX, minY, maxX, maxY);
752 } 752 }
753 753
754 public List<AvatarPickerAvatar> GenerateAgentPickerRequestResponse(LLUUID queryID, string query) 754 public List<AvatarPickerAvatar> GenerateAgentPickerRequestResponse(UUID queryID, string query)
755 { 755 {
756 return m_commsProvider.GenerateAgentPickerRequestResponse(queryID, query); 756 return m_commsProvider.GenerateAgentPickerRequestResponse(queryID, query);
757 } 757 }