Remove hardcoded god requirement from osSetRegionWaterHeight, osSetRegionSunSettings and, osSetEstateSunSettings no matter the threat level.
Change threat level on osSetRegionSunSettings and osSetEstateSunSettings from nuisance to high to match similar functions. If you had enabled these functions but had relied on the hardcoded god check in the code, then please adjust your OSSL permissions config. Thanks to Oren Hurvitz for pointing this out.0.7.4.1
parent
4ab479bf58
commit
ab7c0e7547
|
@ -1179,13 +1179,9 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
|
||||||
CheckThreatLevel(ThreatLevel.High, "osSetRegionWaterHeight");
|
CheckThreatLevel(ThreatLevel.High, "osSetRegionWaterHeight");
|
||||||
|
|
||||||
m_host.AddScriptLPS(1);
|
m_host.AddScriptLPS(1);
|
||||||
//Check to make sure that the script's owner is the estate manager/master
|
|
||||||
//World.Permissions.GenericEstatePermission(
|
|
||||||
if (World.Permissions.IsGod(m_host.OwnerID))
|
|
||||||
{
|
|
||||||
World.EventManager.TriggerRequestChangeWaterHeight((float)height);
|
World.EventManager.TriggerRequestChangeWaterHeight((float)height);
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Changes the Region Sun Settings, then Triggers a Sun Update
|
/// Changes the Region Sun Settings, then Triggers a Sun Update
|
||||||
|
@ -1195,27 +1191,23 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
|
||||||
/// <param name="sunHour">The "Sun Hour" that is desired, 0...24, with 0 just after SunRise</param>
|
/// <param name="sunHour">The "Sun Hour" that is desired, 0...24, with 0 just after SunRise</param>
|
||||||
public void osSetRegionSunSettings(bool useEstateSun, bool sunFixed, double sunHour)
|
public void osSetRegionSunSettings(bool useEstateSun, bool sunFixed, double sunHour)
|
||||||
{
|
{
|
||||||
CheckThreatLevel(ThreatLevel.Nuisance, "osSetRegionSunSettings");
|
CheckThreatLevel(ThreatLevel.High, "osSetRegionSunSettings");
|
||||||
|
|
||||||
m_host.AddScriptLPS(1);
|
m_host.AddScriptLPS(1);
|
||||||
//Check to make sure that the script's owner is the estate manager/master
|
|
||||||
//World.Permissions.GenericEstatePermission(
|
|
||||||
if (World.Permissions.IsGod(m_host.OwnerID))
|
|
||||||
{
|
|
||||||
while (sunHour > 24.0)
|
while (sunHour > 24.0)
|
||||||
sunHour -= 24.0;
|
sunHour -= 24.0;
|
||||||
|
|
||||||
while (sunHour < 0)
|
while (sunHour < 0)
|
||||||
sunHour += 24.0;
|
sunHour += 24.0;
|
||||||
|
|
||||||
|
|
||||||
World.RegionInfo.RegionSettings.UseEstateSun = useEstateSun;
|
World.RegionInfo.RegionSettings.UseEstateSun = useEstateSun;
|
||||||
World.RegionInfo.RegionSettings.SunPosition = sunHour + 6; // LL Region Sun Hour is 6 to 30
|
World.RegionInfo.RegionSettings.SunPosition = sunHour + 6; // LL Region Sun Hour is 6 to 30
|
||||||
World.RegionInfo.RegionSettings.FixedSun = sunFixed;
|
World.RegionInfo.RegionSettings.FixedSun = sunFixed;
|
||||||
World.RegionInfo.RegionSettings.Save();
|
World.RegionInfo.RegionSettings.Save();
|
||||||
|
|
||||||
World.EventManager.TriggerEstateToolsSunUpdate(World.RegionInfo.RegionHandle, sunFixed, useEstateSun, (float)sunHour);
|
World.EventManager.TriggerEstateToolsSunUpdate(
|
||||||
}
|
World.RegionInfo.RegionHandle, sunFixed, useEstateSun, (float)sunHour);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
@ -1225,13 +1217,10 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
|
||||||
/// <param name="sunHour">The "Sun Hour" that is desired, 0...24, with 0 just after SunRise</param>
|
/// <param name="sunHour">The "Sun Hour" that is desired, 0...24, with 0 just after SunRise</param>
|
||||||
public void osSetEstateSunSettings(bool sunFixed, double sunHour)
|
public void osSetEstateSunSettings(bool sunFixed, double sunHour)
|
||||||
{
|
{
|
||||||
CheckThreatLevel(ThreatLevel.Nuisance, "osSetEstateSunSettings");
|
CheckThreatLevel(ThreatLevel.High, "osSetEstateSunSettings");
|
||||||
|
|
||||||
m_host.AddScriptLPS(1);
|
m_host.AddScriptLPS(1);
|
||||||
//Check to make sure that the script's owner is the estate manager/master
|
|
||||||
//World.Permissions.GenericEstatePermission(
|
|
||||||
if (World.Permissions.IsGod(m_host.OwnerID))
|
|
||||||
{
|
|
||||||
while (sunHour > 24.0)
|
while (sunHour > 24.0)
|
||||||
sunHour -= 24.0;
|
sunHour -= 24.0;
|
||||||
|
|
||||||
|
@ -1243,8 +1232,8 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
|
||||||
World.RegionInfo.EstateSettings.FixedSun = sunFixed;
|
World.RegionInfo.EstateSettings.FixedSun = sunFixed;
|
||||||
World.RegionInfo.EstateSettings.Save();
|
World.RegionInfo.EstateSettings.Save();
|
||||||
|
|
||||||
World.EventManager.TriggerEstateToolsSunUpdate(World.RegionInfo.RegionHandle, sunFixed, World.RegionInfo.RegionSettings.UseEstateSun, (float)sunHour);
|
World.EventManager.TriggerEstateToolsSunUpdate(
|
||||||
}
|
World.RegionInfo.RegionHandle, sunFixed, World.RegionInfo.RegionSettings.UseEstateSun, (float)sunHour);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
|
Loading…
Reference in New Issue