aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Framework/Scenes/Scene.cs
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--OpenSim/Region/Framework/Scenes/Scene.cs24
1 files changed, 13 insertions, 11 deletions
diff --git a/OpenSim/Region/Framework/Scenes/Scene.cs b/OpenSim/Region/Framework/Scenes/Scene.cs
index 757ac9f..8591b09 100644
--- a/OpenSim/Region/Framework/Scenes/Scene.cs
+++ b/OpenSim/Region/Framework/Scenes/Scene.cs
@@ -522,6 +522,7 @@ namespace OpenSim.Region.Framework.Scenes
522 public IAttachmentsModule AttachmentsModule { get; set; } 522 public IAttachmentsModule AttachmentsModule { get; set; }
523 public IEntityTransferModule EntityTransferModule { get; private set; } 523 public IEntityTransferModule EntityTransferModule { get; private set; }
524 public IAgentAssetTransactions AgentTransactionsModule { get; private set; } 524 public IAgentAssetTransactions AgentTransactionsModule { get; private set; }
525 public IUserManagement UserManagementModule { get; private set; }
525 526
526 public IAvatarFactoryModule AvatarFactory 527 public IAvatarFactoryModule AvatarFactory
527 { 528 {
@@ -1291,6 +1292,7 @@ namespace OpenSim.Region.Framework.Scenes
1291 EntityTransferModule = RequestModuleInterface<IEntityTransferModule>(); 1292 EntityTransferModule = RequestModuleInterface<IEntityTransferModule>();
1292 m_groupsModule = RequestModuleInterface<IGroupsModule>(); 1293 m_groupsModule = RequestModuleInterface<IGroupsModule>();
1293 AgentTransactionsModule = RequestModuleInterface<IAgentAssetTransactions>(); 1294 AgentTransactionsModule = RequestModuleInterface<IAgentAssetTransactions>();
1295 UserManagementModule = RequestModuleInterface<IUserManagement>();
1294 } 1296 }
1295 1297
1296 #endregion 1298 #endregion
@@ -2094,9 +2096,8 @@ namespace OpenSim.Region.Framework.Scenes
2094 sceneObject.SetGroup(groupID, null); 2096 sceneObject.SetGroup(groupID, null);
2095 } 2097 }
2096 2098
2097 IUserManagement uman = RequestModuleInterface<IUserManagement>(); 2099 if (UserManagementModule != null)
2098 if (uman != null) 2100 sceneObject.RootPart.CreatorIdentification = UserManagementModule.GetUserUUI(ownerID);
2099 sceneObject.RootPart.CreatorIdentification = uman.GetUserUUI(ownerID);
2100 2101
2101 sceneObject.ScheduleGroupForFullUpdate(); 2102 sceneObject.ScheduleGroupForFullUpdate();
2102 2103
@@ -2855,14 +2856,13 @@ namespace OpenSim.Region.Framework.Scenes
2855 /// <param name="aCircuit"></param> 2856 /// <param name="aCircuit"></param>
2856 private void CacheUserName(ScenePresence sp, AgentCircuitData aCircuit) 2857 private void CacheUserName(ScenePresence sp, AgentCircuitData aCircuit)
2857 { 2858 {
2858 IUserManagement uMan = RequestModuleInterface<IUserManagement>(); 2859 if (UserManagementModule != null)
2859 if (uMan != null)
2860 { 2860 {
2861 string first = aCircuit.firstname, last = aCircuit.lastname; 2861 string first = aCircuit.firstname, last = aCircuit.lastname;
2862 2862
2863 if (sp.PresenceType == PresenceType.Npc) 2863 if (sp.PresenceType == PresenceType.Npc)
2864 { 2864 {
2865 uMan.AddUser(aCircuit.AgentID, first, last); 2865 UserManagementModule.AddUser(aCircuit.AgentID, first, last);
2866 } 2866 }
2867 else 2867 else
2868 { 2868 {
@@ -2881,7 +2881,7 @@ namespace OpenSim.Region.Framework.Scenes
2881 } 2881 }
2882 } 2882 }
2883 2883
2884 uMan.AddUser(aCircuit.AgentID, first, last, homeURL); 2884 UserManagementModule.AddUser(aCircuit.AgentID, first, last, homeURL);
2885 } 2885 }
2886 } 2886 }
2887 } 2887 }
@@ -3445,17 +3445,19 @@ namespace OpenSim.Region.Framework.Scenes
3445 3445
3446 if (!isChildAgent) 3446 if (!isChildAgent)
3447 { 3447 {
3448 if (AttachmentsModule != null && avatar.PresenceType != PresenceType.Npc) 3448 if (AttachmentsModule != null)
3449 { 3449 {
3450 IUserManagement uMan = RequestModuleInterface<IUserManagement>();
3451 // Don't save attachments for HG visitors, it 3450 // Don't save attachments for HG visitors, it
3452 // messes up their inventory. When a HG visitor logs 3451 // messes up their inventory. When a HG visitor logs
3453 // out on a foreign grid, their attachments will be 3452 // out on a foreign grid, their attachments will be
3454 // reloaded in the state they were in when they left 3453 // reloaded in the state they were in when they left
3455 // the home grid. This is best anyway as the visited 3454 // the home grid. This is best anyway as the visited
3456 // grid may use an incompatible script engine. 3455 // grid may use an incompatible script engine.
3457 if (uMan == null || uMan.IsLocalGridUser(avatar.UUID)) 3456 bool saveChanged
3458 AttachmentsModule.SaveChangedAttachments(avatar, false); 3457 = avatar.PresenceType != PresenceType.Npc
3458 && (UserManagementModule == null || UserManagementModule.IsLocalGridUser(avatar.UUID));
3459
3460 AttachmentsModule.DeRezAttachments(avatar, saveChanged, false);
3459 } 3461 }
3460 3462
3461 ForEachClient( 3463 ForEachClient(