Handle the case where grid gods and local gods should coexit

Thou shalt have no other gods beside me, your one and true god.
melanie
Melanie Thielker 2017-01-06 01:52:42 +00:00
parent 9b93068054
commit ad531ecb53
1 changed files with 9 additions and 0 deletions

View File

@ -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<bool>(config,
"allow_grid_gods", sections, false);
// If grid gods are active, dont allow any other gods
m_forceGridGods =
Util.GetConfigVarFromSections<bool>(config,
"force_grid_gods", sections, false);
// The owner of a region is a god in his region only.
m_regionOwnerIsGod =
Util.GetConfigVarFromSections<bool>(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;