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.cs49
1 files changed, 40 insertions, 9 deletions
diff --git a/OpenSim/Region/Framework/Scenes/Scene.cs b/OpenSim/Region/Framework/Scenes/Scene.cs
index dcbbe08..bf40d82 100644
--- a/OpenSim/Region/Framework/Scenes/Scene.cs
+++ b/OpenSim/Region/Framework/Scenes/Scene.cs
@@ -142,7 +142,7 @@ namespace OpenSim.Region.Framework.Scenes
142 protected AgentCircuitManager m_authenticateHandler; 142 protected AgentCircuitManager m_authenticateHandler;
143 143
144 protected SceneCommunicationService m_sceneGridService; 144 protected SceneCommunicationService m_sceneGridService;
145 public bool loginsdisabled = true; 145 public bool LoginsDisabled = true;
146 146
147 public new float TimeDilation 147 public new float TimeDilation
148 { 148 {
@@ -1366,15 +1366,19 @@ namespace OpenSim.Region.Framework.Scenes
1366 StatsReporter.addScriptLines(m_sceneGraph.GetScriptLPS()); 1366 StatsReporter.addScriptLines(m_sceneGraph.GetScriptLPS());
1367 } 1367 }
1368 1368
1369 if (loginsdisabled && m_frame > 20) 1369 if (LoginsDisabled && m_frame == 20)
1370 { 1370 {
1371 // In 99.9% of cases it is a bad idea to manually force garbage collection. However, 1371 // In 99.9% of cases it is a bad idea to manually force garbage collection. However,
1372 // this is a rare case where we know we have just went through a long cycle of heap 1372 // this is a rare case where we know we have just went through a long cycle of heap
1373 // allocations, and there is no more work to be done until someone logs in 1373 // allocations, and there is no more work to be done until someone logs in
1374 GC.Collect(); 1374 GC.Collect();
1375 1375
1376 m_log.DebugFormat("[REGION]: Enabling logins for {0}", RegionInfo.RegionName); 1376 IConfig startupConfig = m_config.Configs["Startup"];
1377 loginsdisabled = false; 1377 if (startupConfig == null || !startupConfig.GetBoolean("StartDisabled", false))
1378 {
1379 m_log.DebugFormat("[REGION]: Enabling logins for {0}", RegionInfo.RegionName);
1380 LoginsDisabled = false;
1381 }
1378 } 1382 }
1379 } 1383 }
1380 catch (NotImplementedException) 1384 catch (NotImplementedException)
@@ -1649,9 +1653,9 @@ namespace OpenSim.Region.Framework.Scenes
1649 //m_sceneGridService.RegisterRegion(m_interregionCommsOut, RegionInfo); 1653 //m_sceneGridService.RegisterRegion(m_interregionCommsOut, RegionInfo);
1650 1654
1651 GridRegion region = new GridRegion(RegionInfo); 1655 GridRegion region = new GridRegion(RegionInfo);
1652 bool success = GridService.RegisterRegion(RegionInfo.ScopeID, region); 1656 string error = GridService.RegisterRegion(RegionInfo.ScopeID, region);
1653 if (!success) 1657 if (error != String.Empty)
1654 throw new Exception("Can't register with grid"); 1658 throw new Exception(error);
1655 1659
1656 m_sceneGridService.SetScene(this); 1660 m_sceneGridService.SetScene(this);
1657 m_sceneGridService.InformNeighborsThatRegionisUp(RequestModuleInterface<INeighbourService>(), RegionInfo); 1661 m_sceneGridService.InformNeighborsThatRegionisUp(RequestModuleInterface<INeighbourService>(), RegionInfo);
@@ -3404,7 +3408,7 @@ namespace OpenSim.Region.Framework.Scenes
3404 // TeleportFlags.ViaLandmark | TeleportFlags.ViaLocation | TeleportFlags.ViaLandmark | TeleportFlags.Default - Regular Teleport 3408 // TeleportFlags.ViaLandmark | TeleportFlags.ViaLocation | TeleportFlags.ViaLandmark | TeleportFlags.Default - Regular Teleport
3405 3409
3406 3410
3407 if (loginsdisabled) 3411 if (LoginsDisabled)
3408 { 3412 {
3409 reason = "Logins Disabled"; 3413 reason = "Logins Disabled";
3410 return false; 3414 return false;
@@ -3577,8 +3581,35 @@ namespace OpenSim.Region.Framework.Scenes
3577 return false; 3581 return false;
3578 } 3582 }
3579 3583
3584 IGroupsModule groupsModule =
3585 RequestModuleInterface<IGroupsModule>();
3586
3587 List<UUID> agentGroups = new List<UUID>();
3588
3589 if (groupsModule != null)
3590 {
3591 GroupMembershipData[] GroupMembership =
3592 groupsModule.GetMembershipData(agent.AgentID);
3593
3594 for (int i = 0; i < GroupMembership.Length; i++)
3595 agentGroups.Add(GroupMembership[i].GroupID);
3596 }
3597
3598 bool groupAccess = false;
3599 UUID[] estateGroups = m_regInfo.EstateSettings.EstateGroups;
3600
3601 foreach (UUID group in estateGroups)
3602 {
3603 if (agentGroups.Contains(group))
3604 {
3605 groupAccess = true;
3606 break;
3607 }
3608 }
3609
3580 if (!m_regInfo.EstateSettings.PublicAccess && 3610 if (!m_regInfo.EstateSettings.PublicAccess &&
3581 !m_regInfo.EstateSettings.HasAccess(agent.AgentID)) 3611 !m_regInfo.EstateSettings.HasAccess(agent.AgentID) &&
3612 !groupAccess)
3582 { 3613 {
3583 m_log.WarnFormat("[CONNECTION BEGIN]: Denied access to: {0} ({1} {2}) at {3} because the user does not have access to the estate", 3614 m_log.WarnFormat("[CONNECTION BEGIN]: Denied access to: {0} ({1} {2}) at {3} because the user does not have access to the estate",
3584 agent.AgentID, agent.firstname, agent.lastname, RegionInfo.RegionName); 3615 agent.AgentID, agent.firstname, agent.lastname, RegionInfo.RegionName);