From 175b6115f19f9bad7c81fde625250b3a7f8a33f2 Mon Sep 17 00:00:00 2001 From: Teravus Ovares Date: Mon, 26 Nov 2007 05:02:18 +0000 Subject: * Restarting regions with the estate tools works in sandbox mode. I'm still working on grid mode, however. It doesn't break anything, but that feature doesn't work in grid mode yet either. --- .../Communications/OGS1/OGS1InterSimComms.cs | 26 +++++++++++++++++++++- 1 file changed, 25 insertions(+), 1 deletion(-) (limited to 'OpenSim/Region/Communications/OGS1/OGS1InterSimComms.cs') diff --git a/OpenSim/Region/Communications/OGS1/OGS1InterSimComms.cs b/OpenSim/Region/Communications/OGS1/OGS1InterSimComms.cs index 70018fd..aa6f59a 100644 --- a/OpenSim/Region/Communications/OGS1/OGS1InterSimComms.cs +++ b/OpenSim/Region/Communications/OGS1/OGS1InterSimComms.cs @@ -41,6 +41,8 @@ namespace OpenSim.Region.Communications.OGS1 public delegate bool PrimGroupArrival(ulong regionHandle, LLUUID primID, string objData); + public delegate bool RegionUP (RegionInfo region); + public sealed class InterRegionSingleton { private static readonly InterRegionSingleton instance = new InterRegionSingleton(); @@ -49,6 +51,8 @@ namespace OpenSim.Region.Communications.OGS1 public event ExpectArrival OnArrival; public event InformRegionPrimGroup OnPrimGroupNear; public event PrimGroupArrival OnPrimGroupArrival; + public event RegionUp OnRegionUp; + static InterRegionSingleton() { @@ -72,6 +76,15 @@ namespace OpenSim.Region.Communications.OGS1 return false; } + public bool RegionUp(RegionInfo region) + { + if (OnRegionUp != null) + { + return OnRegionUp(region); + } + return false; + } + public bool ExpectAvatarCrossing(ulong regionHandle, LLUUID agentID, LLVector3 position, bool isFlying) { if (OnArrival != null) @@ -116,7 +129,18 @@ namespace OpenSim.Region.Communications.OGS1 return false; } } - + public bool RegionUp(RegionInfo region) + { + try + { + return InterRegionSingleton.Instance.RegionUp(region); + } + catch (RemotingException e) + { + Console.WriteLine("Remoting Error: Unable to connect to remote region.\n" + e.ToString()); + return false; + } + } public bool ExpectAvatarCrossing(ulong regionHandle, LLUUID agentID, LLVector3 position, bool isFlying) { try -- cgit v1.1