aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Framework
diff options
context:
space:
mode:
authorDiva Canto2010-05-07 21:29:56 -0700
committerDiva Canto2010-05-07 21:29:56 -0700
commita58859a0d4206c194c9c56212218e2cafc2cc373 (patch)
treefed51a4e40c344b76f6b8b4d5c5b2ec0d2e142e4 /OpenSim/Region/Framework
parentimprove handling of undersize sculpt textures (diff)
downloadopensim-SC-a58859a0d4206c194c9c56212218e2cafc2cc373.zip
opensim-SC-a58859a0d4206c194c9c56212218e2cafc2cc373.tar.gz
opensim-SC-a58859a0d4206c194c9c56212218e2cafc2cc373.tar.bz2
opensim-SC-a58859a0d4206c194c9c56212218e2cafc2cc373.tar.xz
GridUserService in place. Replaces the contrived concept of storing user's home and position info in the presence service. WARNING: I violated a taboo by deleting 2 migration files and simplifying the original table creation for Presence. This should not cause any problems to anyone, though. Things will work with the new simplified table, as well as with the previous contrived one. If there are any problems, solving them is as easy as dropping the presence table and deleting its row in the migrations table. The presence info only exists during a user's session anyway.
BTW, the Meshing files want to be committed too -- EOFs.
Diffstat (limited to 'OpenSim/Region/Framework')
-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 1a46837..c0fa7b4 100644
--- a/OpenSim/Region/Framework/Scenes/Scene.cs
+++ b/OpenSim/Region/Framework/Scenes/Scene.cs
@@ -304,7 +304,18 @@ namespace OpenSim.Region.Framework.Scenes
304 return m_AvatarService; 304 return m_AvatarService;
305 } 305 }
306 } 306 }
307 307
308 protected IGridUserService m_GridUserService;
309 public IGridUserService GridUserService
310 {
311 get
312 {
313 if (m_GridUserService == null)
314 m_GridUserService = RequestModuleInterface<IGridUserService>();
315 return m_GridUserService;
316 }
317 }
318
308 protected IXMLRPC m_xmlrpcModule; 319 protected IXMLRPC m_xmlrpcModule;
309 protected IWorldComm m_worldCommModule; 320 protected IWorldComm m_worldCommModule;
310 public IAttachmentsModule AttachmentsModule { get; set; } 321 public IAttachmentsModule AttachmentsModule { get; set; }
@@ -1306,8 +1317,8 @@ namespace OpenSim.Region.Framework.Scenes
1306 if (defaultRegions != null && defaultRegions.Count >= 1) 1317 if (defaultRegions != null && defaultRegions.Count >= 1)
1307 home = defaultRegions[0]; 1318 home = defaultRegions[0];
1308 1319
1309 if (PresenceService != null && home != null) 1320 if (GridUserService != null && home != null)
1310 PresenceService.SetHomeLocation(account.PrincipalID.ToString(), home.RegionID, new Vector3(128, 128, 0), new Vector3(0, 1, 0)); 1321 GridUserService.SetHome(account.PrincipalID.ToString(), home.RegionID, new Vector3(128, 128, 0), new Vector3(0, 1, 0));
1311 else 1322 else
1312 m_log.WarnFormat("[USER ACCOUNT SERVICE]: Unable to set home for account {0} {1}.", 1323 m_log.WarnFormat("[USER ACCOUNT SERVICE]: Unable to set home for account {0} {1}.",
1313 first, last); 1324 first, last);
@@ -3095,7 +3106,7 @@ namespace OpenSim.Region.Framework.Scenes
3095 /// <param name="flags"></param> 3106 /// <param name="flags"></param>
3096 public virtual void SetHomeRezPoint(IClientAPI remoteClient, ulong regionHandle, Vector3 position, Vector3 lookAt, uint flags) 3107 public virtual void SetHomeRezPoint(IClientAPI remoteClient, ulong regionHandle, Vector3 position, Vector3 lookAt, uint flags)
3097 { 3108 {
3098 if (PresenceService.SetHomeLocation(remoteClient.AgentId.ToString(), RegionInfo.RegionID, position, lookAt)) 3109 if (GridUserService != null && GridUserService.SetHome(remoteClient.AgentId.ToString(), RegionInfo.RegionID, position, lookAt))
3099 // FUBAR ALERT: this needs to be "Home position set." so the viewer saves a home-screenshot. 3110 // FUBAR ALERT: this needs to be "Home position set." so the viewer saves a home-screenshot.
3100 m_dialogModule.SendAlertToUser(remoteClient, "Home position set."); 3111 m_dialogModule.SendAlertToUser(remoteClient, "Home position set.");
3101 else 3112 else
@@ -3543,7 +3554,7 @@ namespace OpenSim.Region.Framework.Scenes
3543 3554
3544 OpenSim.Services.Interfaces.PresenceInfo pinfo = presence.GetAgent(agent.SessionID); 3555 OpenSim.Services.Interfaces.PresenceInfo pinfo = presence.GetAgent(agent.SessionID);
3545 3556
3546 if (pinfo == null || (pinfo != null && pinfo.Online == false)) 3557 if (pinfo == null)
3547 { 3558 {
3548 reason = String.Format("Failed to verify user {0} {1}, access denied to region {2}.", agent.firstname, agent.lastname, RegionInfo.RegionName); 3559 reason = String.Format("Failed to verify user {0} {1}, access denied to region {2}.", agent.firstname, agent.lastname, RegionInfo.RegionName);
3549 return false; 3560 return false;