From 96689723e5002075b45d01fe4243bf2d87d916b4 Mon Sep 17 00:00:00 2001 From: Melanie Thielker Date: Fri, 10 Oct 2008 01:10:33 +0000 Subject: Add the beginnings of a sim health check (through remote admin) --- .../Modules/World/Estate/EstateManagementModule.cs | 5 +++++ OpenSim/Region/Environment/Scenes/Scene.cs | 14 ++++++++++++++ 2 files changed, 19 insertions(+) (limited to 'OpenSim/Region/Environment') diff --git a/OpenSim/Region/Environment/Modules/World/Estate/EstateManagementModule.cs b/OpenSim/Region/Environment/Modules/World/Estate/EstateManagementModule.cs index 616132b..7a9dc72 100644 --- a/OpenSim/Region/Environment/Modules/World/Estate/EstateManagementModule.cs +++ b/OpenSim/Region/Environment/Modules/World/Estate/EstateManagementModule.cs @@ -585,6 +585,11 @@ namespace OpenSim.Region.Environment.Modules.World.Estate args.SimOwner = m_scene.RegionInfo.EstateSettings.EstateOwner; else args.SimOwner = m_scene.RegionInfo.MasterAvatarAssignedUUID; + + // Fudge estate owner + if (m_scene.ExternalChecks.ExternalChecksCanBeGodLike(remoteClient.AgentId)) + args.SimOwner = remoteClient.AgentId; + args.terrainBase0 = UUID.Zero; args.terrainBase1 = UUID.Zero; args.terrainBase2 = UUID.Zero; diff --git a/OpenSim/Region/Environment/Scenes/Scene.cs b/OpenSim/Region/Environment/Scenes/Scene.cs index 27c315c..8bd3642 100644 --- a/OpenSim/Region/Environment/Scenes/Scene.cs +++ b/OpenSim/Region/Environment/Scenes/Scene.cs @@ -168,6 +168,7 @@ namespace OpenSim.Region.Environment.Scenes private bool m_physics_enabled = true; private bool m_scripts_enabled = true; private string m_defaultScriptEngine; + private int m_LastLogin = 0; #endregion @@ -2142,6 +2143,7 @@ namespace OpenSim.Region.Environment.Scenes CreateAndAddScenePresence(client, child); } + m_LastLogin = System.Environment.TickCount; EventManager.TriggerOnNewClient(client); } @@ -4258,5 +4260,17 @@ namespace OpenSim.Region.Environment.Scenes { m_storageManager.DataStore.RemoveObject(uuid, m_regInfo.RegionID); } + + public int GetHealth() + { + int health=1; // Start at 1, means we're up + + // A login in the last 4 mins? We can't be doing too badly + // + if ((System.Environment.TickCount - m_LastLogin) < 240000) + health++; + + return 0; + } } } -- cgit v1.1