restore parcels avatars visibility god level change correct handling; try to reduced the increased change of user error on config options setting
parent
e5a3d85bc7
commit
c707955517
|
@ -50,7 +50,7 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
ScenePresence m_scenePresence;
|
ScenePresence m_scenePresence;
|
||||||
Scene m_scene;
|
Scene m_scene;
|
||||||
protected bool m_allowGridGods;
|
protected bool m_allowGridGods;
|
||||||
protected bool m_forceGridGods;
|
protected bool m_forceGridGodsOnly;
|
||||||
protected bool m_regionOwnerIsGod;
|
protected bool m_regionOwnerIsGod;
|
||||||
protected bool m_regionManagerIsGod;
|
protected bool m_regionManagerIsGod;
|
||||||
protected bool m_parcelOwnerIsGod;
|
protected bool m_parcelOwnerIsGod;
|
||||||
|
@ -78,10 +78,12 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
"allow_grid_gods", sections, false);
|
"allow_grid_gods", sections, false);
|
||||||
|
|
||||||
// If grid gods are active, dont allow any other gods
|
// If grid gods are active, dont allow any other gods
|
||||||
m_forceGridGods =
|
m_forceGridGodsOnly =
|
||||||
Util.GetConfigVarFromSections<bool>(config,
|
Util.GetConfigVarFromSections<bool>(config,
|
||||||
"force_grid_gods", sections, false);
|
"force_grid_gods_only", sections, false);
|
||||||
|
|
||||||
|
if(!m_forceGridGodsOnly) // damm redundant and error prone option
|
||||||
|
{
|
||||||
// The owner of a region is a god in his region only.
|
// The owner of a region is a god in his region only.
|
||||||
m_regionOwnerIsGod =
|
m_regionOwnerIsGod =
|
||||||
Util.GetConfigVarFromSections<bool>(config,
|
Util.GetConfigVarFromSections<bool>(config,
|
||||||
|
@ -96,6 +98,9 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
m_parcelOwnerIsGod =
|
m_parcelOwnerIsGod =
|
||||||
Util.GetConfigVarFromSections<bool>(config,
|
Util.GetConfigVarFromSections<bool>(config,
|
||||||
"parcel_owner_is_god", sections, false);
|
"parcel_owner_is_god", sections, false);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
m_allowGridGods = true; // reduce user mistakes increased by this over complex options set
|
||||||
|
|
||||||
// God mode should be turned on in the viewer whenever
|
// God mode should be turned on in the viewer whenever
|
||||||
// the user has god rights somewhere. They may choose
|
// the user has god rights somewhere. They may choose
|
||||||
|
@ -110,13 +115,12 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
m_allowGodActionsWithoutGodMode =
|
m_allowGodActionsWithoutGodMode =
|
||||||
Util.GetConfigVarFromSections<bool>(config,
|
Util.GetConfigVarFromSections<bool>(config,
|
||||||
"implicit_gods", sections, false);
|
"implicit_gods", sections, false);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
protected int PotentialGodLevel()
|
protected int PotentialGodLevel()
|
||||||
{
|
{
|
||||||
int godLevel = m_allowGridGods ? m_userLevel : 200;
|
int godLevel = m_allowGridGods ? m_userLevel : 200;
|
||||||
if ((!m_forceGridGods) && m_userLevel < 200)
|
if ((!m_forceGridGodsOnly) && m_userLevel < 200)
|
||||||
godLevel = 200;
|
godLevel = 200;
|
||||||
|
|
||||||
return godLevel;
|
return godLevel;
|
||||||
|
@ -127,6 +131,9 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
if (m_allowGridGods && m_userLevel > 0)
|
if (m_allowGridGods && m_userLevel > 0)
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
|
if(m_forceGridGodsOnly)
|
||||||
|
return false;
|
||||||
|
|
||||||
if (m_regionOwnerIsGod && m_scene.RegionInfo.EstateSettings.IsEstateOwner(m_scenePresence.UUID))
|
if (m_regionOwnerIsGod && m_scene.RegionInfo.EstateSettings.IsEstateOwner(m_scenePresence.UUID))
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
|
@ -164,13 +171,12 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
|
|
||||||
public bool RequestGodMode(bool god)
|
public bool RequestGodMode(bool god)
|
||||||
{
|
{
|
||||||
|
// this is used by viewer protocol
|
||||||
|
// and they may want a answer
|
||||||
if (!god)
|
if (!god)
|
||||||
{
|
{
|
||||||
if (m_viewerUiIsGod)
|
|
||||||
m_scenePresence.ControllingClient.SendAdminResponse(UUID.Zero, 0);
|
m_scenePresence.ControllingClient.SendAdminResponse(UUID.Zero, 0);
|
||||||
|
|
||||||
m_viewerUiIsGod = false;
|
m_viewerUiIsGod = false;
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -178,12 +184,8 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
int godLevel = PotentialGodLevel();
|
int godLevel = PotentialGodLevel();
|
||||||
|
|
||||||
if (!m_viewerUiIsGod)
|
|
||||||
m_scenePresence.ControllingClient.SendAdminResponse(UUID.Zero, (uint)godLevel);
|
m_scenePresence.ControllingClient.SendAdminResponse(UUID.Zero, (uint)godLevel);
|
||||||
|
|
||||||
m_viewerUiIsGod = true;
|
m_viewerUiIsGod = true;
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -4509,9 +4509,11 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
if (isNPC)
|
if (isNPC)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
bool success = GodController.RequestGodMode(godStatus);
|
bool wasgod = (GodController.GodLevel >= 200);
|
||||||
if (success && godStatus)
|
GodController.RequestGodMode(godStatus);
|
||||||
parcelGodCheck(m_currentParcelUUID, GodController.GodLevel >= 200);
|
bool isgod = GodController.GodLevel >= 200;
|
||||||
|
if (wasgod != isgod)
|
||||||
|
parcelGodCheck(m_currentParcelUUID, isgod);
|
||||||
}
|
}
|
||||||
|
|
||||||
#region Child Agent Updates
|
#region Child Agent Updates
|
||||||
|
|
Loading…
Reference in New Issue