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.cs43
1 files changed, 37 insertions, 6 deletions
diff --git a/OpenSim/Region/Framework/Scenes/Scene.cs b/OpenSim/Region/Framework/Scenes/Scene.cs
index 764ac60..bc9301b 100644
--- a/OpenSim/Region/Framework/Scenes/Scene.cs
+++ b/OpenSim/Region/Framework/Scenes/Scene.cs
@@ -144,7 +144,7 @@ namespace OpenSim.Region.Framework.Scenes
144 public CommunicationsManager CommsManager; 144 public CommunicationsManager CommsManager;
145 145
146 protected SceneCommunicationService m_sceneGridService; 146 protected SceneCommunicationService m_sceneGridService;
147 public bool loginsdisabled = true; 147 public bool LoginsDisabled = true;
148 148
149 public new float TimeDilation 149 public new float TimeDilation
150 { 150 {
@@ -1275,15 +1275,19 @@ namespace OpenSim.Region.Framework.Scenes
1275 StatsReporter.addScriptLines(m_sceneGraph.GetScriptLPS()); 1275 StatsReporter.addScriptLines(m_sceneGraph.GetScriptLPS());
1276 } 1276 }
1277 1277
1278 if (loginsdisabled && m_frame > 20) 1278 if (LoginsDisabled && m_frame == 20)
1279 { 1279 {
1280 // In 99.9% of cases it is a bad idea to manually force garbage collection. However, 1280 // In 99.9% of cases it is a bad idea to manually force garbage collection. However,
1281 // this is a rare case where we know we have just went through a long cycle of heap 1281 // this is a rare case where we know we have just went through a long cycle of heap
1282 // allocations, and there is no more work to be done until someone logs in 1282 // allocations, and there is no more work to be done until someone logs in
1283 GC.Collect(); 1283 GC.Collect();
1284 1284
1285 m_log.DebugFormat("[REGION]: Enabling logins for {0}", RegionInfo.RegionName); 1285 IConfig startupConfig = m_config.Configs["Startup"];
1286 loginsdisabled = false; 1286 if (startupConfig == null || !startupConfig.GetBoolean("StartDisabled", false))
1287 {
1288 m_log.DebugFormat("[REGION]: Enabling logins for {0}", RegionInfo.RegionName);
1289 LoginsDisabled = false;
1290 }
1287 } 1291 }
1288 } 1292 }
1289 catch (NotImplementedException) 1293 catch (NotImplementedException)
@@ -3348,7 +3352,7 @@ namespace OpenSim.Region.Framework.Scenes
3348 // TeleportFlags.ViaLandmark | TeleportFlags.ViaLocation | TeleportFlags.ViaLandmark | TeleportFlags.Default - Regular Teleport 3352 // TeleportFlags.ViaLandmark | TeleportFlags.ViaLocation | TeleportFlags.ViaLandmark | TeleportFlags.Default - Regular Teleport
3349 3353
3350 3354
3351 if (loginsdisabled) 3355 if (LoginsDisabled)
3352 { 3356 {
3353 reason = "Logins Disabled"; 3357 reason = "Logins Disabled";
3354 return false; 3358 return false;
@@ -3525,8 +3529,35 @@ namespace OpenSim.Region.Framework.Scenes
3525 return false; 3529 return false;
3526 } 3530 }
3527 3531
3532 IGroupsModule groupsModule =
3533 RequestModuleInterface<IGroupsModule>();
3534
3535 List<UUID> agentGroups = new List<UUID>();
3536
3537 if (groupsModule != null)
3538 {
3539 GroupMembershipData[] GroupMembership =
3540 groupsModule.GetMembershipData(agent.AgentID);
3541
3542 for (int i = 0; i < GroupMembership.Length; i++)
3543 agentGroups.Add(GroupMembership[i].GroupID);
3544 }
3545
3546 bool groupAccess = false;
3547 UUID[] estateGroups = m_regInfo.EstateSettings.EstateGroups;
3548
3549 foreach (UUID group in estateGroups)
3550 {
3551 if (agentGroups.Contains(group))
3552 {
3553 groupAccess = true;
3554 break;
3555 }
3556 }
3557
3528 if (!m_regInfo.EstateSettings.PublicAccess && 3558 if (!m_regInfo.EstateSettings.PublicAccess &&
3529 !m_regInfo.EstateSettings.HasAccess(agent.AgentID)) 3559 !m_regInfo.EstateSettings.HasAccess(agent.AgentID) &&
3560 !groupAccess)
3530 { 3561 {
3531 m_log.WarnFormat("[CONNECTION BEGIN]: Denied access to: {0} ({1} {2}) at {3} because the user does not have access to the estate", 3562 m_log.WarnFormat("[CONNECTION BEGIN]: Denied access to: {0} ({1} {2}) at {3} because the user does not have access to the estate",
3532 agent.AgentID, agent.firstname, agent.lastname, RegionInfo.RegionName); 3563 agent.AgentID, agent.firstname, agent.lastname, RegionInfo.RegionName);