From ad531ecb5388e2dc0efa321d9497f451633bef40 Mon Sep 17 00:00:00 2001 From: Melanie Thielker Date: Fri, 6 Jan 2017 01:52:42 +0000 Subject: Handle the case where grid gods and local gods should coexit Thou shalt have no other gods beside me, your one and true god. --- OpenSim/Region/Framework/Scenes/GodController.cs | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'OpenSim/Region') diff --git a/OpenSim/Region/Framework/Scenes/GodController.cs b/OpenSim/Region/Framework/Scenes/GodController.cs index abdbe51..95fdc02 100644 --- a/OpenSim/Region/Framework/Scenes/GodController.cs +++ b/OpenSim/Region/Framework/Scenes/GodController.cs @@ -50,6 +50,7 @@ namespace OpenSim.Region.Framework.Scenes ScenePresence m_scenePresence; Scene m_scene; protected bool m_allowGridGods; + protected bool m_forceGridGods; protected bool m_regionOwnerIsGod; protected bool m_regionManagerIsGod; protected bool m_parcelOwnerIsGod; @@ -76,6 +77,11 @@ namespace OpenSim.Region.Framework.Scenes Util.GetConfigVarFromSections(config, "allow_grid_gods", sections, false); + // If grid gods are active, dont allow any other gods + m_forceGridGods = + Util.GetConfigVarFromSections(config, + "force_grid_gods", sections, false); + // The owner of a region is a god in his region only. m_regionOwnerIsGod = Util.GetConfigVarFromSections(config, @@ -138,6 +144,9 @@ namespace OpenSim.Region.Framework.Scenes bool shoudBeGod = m_forceGodModeAlwaysOn ? canBeGod : (m_viewerUiIsGod && canBeGod); int godLevel = m_allowGridGods ? m_userLevel : 200; + if ((!m_forceGridGods) && m_userLevel < 200) + godLevel = 200; + if (!shoudBeGod) godLevel = 0; -- cgit v1.1