diff options
Diffstat (limited to 'OpenSim/Region/Framework/Scenes/Hypergrid/HGSceneCommunicationService.cs')
-rw-r--r-- | OpenSim/Region/Framework/Scenes/Hypergrid/HGSceneCommunicationService.cs | 19 |
1 files changed, 14 insertions, 5 deletions
diff --git a/OpenSim/Region/Framework/Scenes/Hypergrid/HGSceneCommunicationService.cs b/OpenSim/Region/Framework/Scenes/Hypergrid/HGSceneCommunicationService.cs index ee5eb90..1217f9b 100644 --- a/OpenSim/Region/Framework/Scenes/Hypergrid/HGSceneCommunicationService.cs +++ b/OpenSim/Region/Framework/Scenes/Hypergrid/HGSceneCommunicationService.cs | |||
@@ -38,6 +38,7 @@ using OpenSim.Framework.Communications; | |||
38 | using OpenSim.Framework.Communications.Cache; | 38 | using OpenSim.Framework.Communications.Cache; |
39 | using OpenSim.Framework.Capabilities; | 39 | using OpenSim.Framework.Capabilities; |
40 | using OpenSim.Region.Framework.Interfaces; | 40 | using OpenSim.Region.Framework.Interfaces; |
41 | using OpenSim.Services.Interfaces; | ||
41 | using GridRegion = OpenSim.Services.Interfaces.GridRegion; | 42 | using GridRegion = OpenSim.Services.Interfaces.GridRegion; |
42 | 43 | ||
43 | namespace OpenSim.Region.Framework.Scenes.Hypergrid | 44 | namespace OpenSim.Region.Framework.Scenes.Hypergrid |
@@ -46,11 +47,19 @@ namespace OpenSim.Region.Framework.Scenes.Hypergrid | |||
46 | { | 47 | { |
47 | private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); | 48 | private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); |
48 | 49 | ||
49 | public readonly IHyperlink m_hg; | 50 | private IHyperlinkService m_hg; |
51 | IHyperlinkService HyperlinkService | ||
52 | { | ||
53 | get | ||
54 | { | ||
55 | if (m_hg == null) | ||
56 | m_hg = m_scene.RequestModuleInterface<IHyperlinkService>(); | ||
57 | return m_hg; | ||
58 | } | ||
59 | } | ||
50 | 60 | ||
51 | public HGSceneCommunicationService(CommunicationsManager commsMan, IHyperlink hg) : base(commsMan) | 61 | public HGSceneCommunicationService(CommunicationsManager commsMan) : base(commsMan) |
52 | { | 62 | { |
53 | m_hg = hg; | ||
54 | } | 63 | } |
55 | 64 | ||
56 | 65 | ||
@@ -129,13 +138,13 @@ namespace OpenSim.Region.Framework.Scenes.Hypergrid | |||
129 | /// Hypergrid mod start | 138 | /// Hypergrid mod start |
130 | /// | 139 | /// |
131 | /// | 140 | /// |
132 | bool isHyperLink = m_hg.IsHyperlinkRegion(reg.RegionHandle); | 141 | bool isHyperLink = (HyperlinkService.GetHyperlinkRegion(reg.RegionHandle) != null); |
133 | bool isHomeUser = true; | 142 | bool isHomeUser = true; |
134 | ulong realHandle = regionHandle; | 143 | ulong realHandle = regionHandle; |
135 | CachedUserInfo uinfo = m_commsProvider.UserProfileCacheService.GetUserDetails(avatar.UUID); | 144 | CachedUserInfo uinfo = m_commsProvider.UserProfileCacheService.GetUserDetails(avatar.UUID); |
136 | if (uinfo != null) | 145 | if (uinfo != null) |
137 | { | 146 | { |
138 | isHomeUser = HGNetworkServersInfo.Singleton.IsLocalUser(uinfo.UserProfile); | 147 | isHomeUser = HyperlinkService.IsLocalUser(uinfo.UserProfile.ID); |
139 | realHandle = m_hg.FindRegionHandle(regionHandle); | 148 | realHandle = m_hg.FindRegionHandle(regionHandle); |
140 | m_log.Debug("XXX ---- home user? " + isHomeUser + " --- hyperlink? " + isHyperLink + " --- real handle: " + realHandle.ToString()); | 149 | m_log.Debug("XXX ---- home user? " + isHomeUser + " --- hyperlink? " + isHyperLink + " --- real handle: " + realHandle.ToString()); |
141 | } | 150 | } |