aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Framework/Scenes/Scene.cs
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region/Framework/Scenes/Scene.cs')
-rw-r--r--OpenSim/Region/Framework/Scenes/Scene.cs21
1 files changed, 16 insertions, 5 deletions
diff --git a/OpenSim/Region/Framework/Scenes/Scene.cs b/OpenSim/Region/Framework/Scenes/Scene.cs
index 0ca5948..2197ced 100644
--- a/OpenSim/Region/Framework/Scenes/Scene.cs
+++ b/OpenSim/Region/Framework/Scenes/Scene.cs
@@ -318,7 +318,18 @@ namespace OpenSim.Region.Framework.Scenes
318 return m_AvatarService; 318 return m_AvatarService;
319 } 319 }
320 } 320 }
321 321
322 protected IGridUserService m_GridUserService;
323 public IGridUserService GridUserService
324 {
325 get
326 {
327 if (m_GridUserService == null)
328 m_GridUserService = RequestModuleInterface<IGridUserService>();
329 return m_GridUserService;
330 }
331 }
332
322 protected IXMLRPC m_xmlrpcModule; 333 protected IXMLRPC m_xmlrpcModule;
323 protected IWorldComm m_worldCommModule; 334 protected IWorldComm m_worldCommModule;
324 public IAttachmentsModule AttachmentsModule { get; set; } 335 public IAttachmentsModule AttachmentsModule { get; set; }
@@ -1334,8 +1345,8 @@ namespace OpenSim.Region.Framework.Scenes
1334 if (defaultRegions != null && defaultRegions.Count >= 1) 1345 if (defaultRegions != null && defaultRegions.Count >= 1)
1335 home = defaultRegions[0]; 1346 home = defaultRegions[0];
1336 1347
1337 if (PresenceService != null && home != null) 1348 if (GridUserService != null && home != null)
1338 PresenceService.SetHomeLocation(account.PrincipalID.ToString(), home.RegionID, new Vector3(128, 128, 0), new Vector3(0, 1, 0)); 1349 GridUserService.SetHome(account.PrincipalID.ToString(), home.RegionID, new Vector3(128, 128, 0), new Vector3(0, 1, 0));
1339 else 1350 else
1340 m_log.WarnFormat("[USER ACCOUNT SERVICE]: Unable to set home for account {0} {1}.", 1351 m_log.WarnFormat("[USER ACCOUNT SERVICE]: Unable to set home for account {0} {1}.",
1341 first, last); 1352 first, last);
@@ -3123,7 +3134,7 @@ namespace OpenSim.Region.Framework.Scenes
3123 /// <param name="flags"></param> 3134 /// <param name="flags"></param>
3124 public virtual void SetHomeRezPoint(IClientAPI remoteClient, ulong regionHandle, Vector3 position, Vector3 lookAt, uint flags) 3135 public virtual void SetHomeRezPoint(IClientAPI remoteClient, ulong regionHandle, Vector3 position, Vector3 lookAt, uint flags)
3125 { 3136 {
3126 if (PresenceService.SetHomeLocation(remoteClient.AgentId.ToString(), RegionInfo.RegionID, position, lookAt)) 3137 if (GridUserService != null && GridUserService.SetHome(remoteClient.AgentId.ToString(), RegionInfo.RegionID, position, lookAt))
3127 // FUBAR ALERT: this needs to be "Home position set." so the viewer saves a home-screenshot. 3138 // FUBAR ALERT: this needs to be "Home position set." so the viewer saves a home-screenshot.
3128 m_dialogModule.SendAlertToUser(remoteClient, "Home position set."); 3139 m_dialogModule.SendAlertToUser(remoteClient, "Home position set.");
3129 else 3140 else
@@ -3577,7 +3588,7 @@ namespace OpenSim.Region.Framework.Scenes
3577 3588
3578 OpenSim.Services.Interfaces.PresenceInfo pinfo = presence.GetAgent(agent.SessionID); 3589 OpenSim.Services.Interfaces.PresenceInfo pinfo = presence.GetAgent(agent.SessionID);
3579 3590
3580 if (pinfo == null || (pinfo != null && pinfo.Online == false)) 3591 if (pinfo == null)
3581 { 3592 {
3582 reason = String.Format("Failed to verify user {0} {1}, access denied to region {2}.", agent.firstname, agent.lastname, RegionInfo.RegionName); 3593 reason = String.Format("Failed to verify user {0} {1}, access denied to region {2}.", agent.firstname, agent.lastname, RegionInfo.RegionName);
3583 return false; 3594 return false;