diff options
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Region/CoreModules/ServiceConnectorsOut/Grid/HGGridConnector.cs | 28 |
1 files changed, 26 insertions, 2 deletions
diff --git a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Grid/HGGridConnector.cs b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Grid/HGGridConnector.cs index 0c2a835..b5bade6 100644 --- a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Grid/HGGridConnector.cs +++ b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Grid/HGGridConnector.cs | |||
@@ -47,7 +47,7 @@ using Nini.Config; | |||
47 | 47 | ||
48 | namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Grid | 48 | namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Grid |
49 | { | 49 | { |
50 | public class HGGridConnector : ISharedRegionModule, IGridService | 50 | public class HGGridConnector : ISharedRegionModule, IGridService, IHyperlinkService |
51 | { | 51 | { |
52 | private static readonly ILog m_log = | 52 | private static readonly ILog m_log = |
53 | LogManager.GetLogger( | 53 | LogManager.GetLogger( |
@@ -142,6 +142,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Grid | |||
142 | return; | 142 | return; |
143 | 143 | ||
144 | scene.RegisterModuleInterface<IGridService>(this); | 144 | scene.RegisterModuleInterface<IGridService>(this); |
145 | scene.RegisterModuleInterface<IHyperlinkService>(this); | ||
145 | 146 | ||
146 | } | 147 | } |
147 | 148 | ||
@@ -367,10 +368,11 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Grid | |||
367 | } | 368 | } |
368 | #endregion | 369 | #endregion |
369 | 370 | ||
370 | #region Hyperlinks | 371 | #region IHyperlinkService |
371 | 372 | ||
372 | private static Random random = new Random(); | 373 | private static Random random = new Random(); |
373 | 374 | ||
375 | |||
374 | public GridRegion TryLinkRegionToCoords(Scene m_scene, IClientAPI client, string mapName, int xloc, int yloc) | 376 | public GridRegion TryLinkRegionToCoords(Scene m_scene, IClientAPI client, string mapName, int xloc, int yloc) |
375 | { | 377 | { |
376 | string host = "127.0.0.1"; | 378 | string host = "127.0.0.1"; |
@@ -417,6 +419,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Grid | |||
417 | return null; | 419 | return null; |
418 | } | 420 | } |
419 | 421 | ||
422 | |||
420 | // From the map search and secondlife://blah | 423 | // From the map search and secondlife://blah |
421 | public GridRegion TryLinkRegion(Scene m_scene, IClientAPI client, string mapName) | 424 | public GridRegion TryLinkRegion(Scene m_scene, IClientAPI client, string mapName) |
422 | { | 425 | { |
@@ -554,6 +557,27 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Grid | |||
554 | return true; | 557 | return true; |
555 | } | 558 | } |
556 | 559 | ||
560 | public GridRegion TryLinkRegion(IClientAPI client, string regionDescriptor) | ||
561 | { | ||
562 | return TryLinkRegion((Scene)client.Scene, client, regionDescriptor); | ||
563 | } | ||
564 | |||
565 | public GridRegion GetHyperlinkRegion(ulong handle) | ||
566 | { | ||
567 | foreach (GridRegion r in m_HyperlinkRegions.Values) | ||
568 | if (r.RegionHandle == handle) | ||
569 | return r; | ||
570 | return null; | ||
571 | } | ||
572 | |||
573 | public ulong FindRegionHandle(ulong handle) | ||
574 | { | ||
575 | foreach (GridRegion r in m_HyperlinkRegions.Values) | ||
576 | if ((r.RegionHandle == handle) && (m_HyperlinkHandles.ContainsKey(r.RegionID))) | ||
577 | return m_HyperlinkHandles[r.RegionID]; | ||
578 | return 0; | ||
579 | } | ||
580 | |||
557 | #endregion | 581 | #endregion |
558 | 582 | ||
559 | } | 583 | } |