diff options
Diffstat (limited to 'OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LS_Api.cs')
-rw-r--r-- | OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LS_Api.cs | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LS_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LS_Api.cs index 1d6cb6d..30eed40 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LS_Api.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LS_Api.cs | |||
@@ -446,7 +446,9 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
446 | LSShoutError("LightShare functions are not enabled."); | 446 | LSShoutError("LightShare functions are not enabled."); |
447 | return 0; | 447 | return 0; |
448 | } | 448 | } |
449 | if (!World.RegionInfo.EstateSettings.IsEstateManagerOrOwner(m_host.OwnerID) && World.GetScenePresence(m_host.OwnerID).GodLevel < 200) | 449 | |
450 | ScenePresence sp = World.GetScenePresence(m_host.OwnerID); | ||
451 | if (!World.RegionInfo.EstateSettings.IsEstateManagerOrOwner(m_host.OwnerID) && (sp == null || sp.GodLevel < 200)) | ||
450 | { | 452 | { |
451 | LSShoutError("lsSetWindlightScene can only be used by estate managers or owners."); | 453 | LSShoutError("lsSetWindlightScene can only be used by estate managers or owners."); |
452 | return 0; | 454 | return 0; |
@@ -474,7 +476,9 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
474 | LSShoutError("LightShare functions are not enabled."); | 476 | LSShoutError("LightShare functions are not enabled."); |
475 | return; | 477 | return; |
476 | } | 478 | } |
477 | if (!World.RegionInfo.EstateSettings.IsEstateManagerOrOwner(m_host.OwnerID) && World.GetScenePresence(m_host.OwnerID).GodLevel < 200) | 479 | |
480 | ScenePresence sp = World.GetScenePresence(m_host.OwnerID); | ||
481 | if (!World.RegionInfo.EstateSettings.IsEstateManagerOrOwner(m_host.OwnerID) && (sp == null || sp.GodLevel < 200)) | ||
478 | { | 482 | { |
479 | LSShoutError("lsSetWindlightScene can only be used by estate managers or owners."); | 483 | LSShoutError("lsSetWindlightScene can only be used by estate managers or owners."); |
480 | return; | 484 | return; |
@@ -497,7 +501,9 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
497 | LSShoutError("LightShare functions are not enabled."); | 501 | LSShoutError("LightShare functions are not enabled."); |
498 | return 0; | 502 | return 0; |
499 | } | 503 | } |
500 | if (!World.RegionInfo.EstateSettings.IsEstateManagerOrOwner(m_host.OwnerID) && World.GetScenePresence(m_host.OwnerID).GodLevel < 200) | 504 | |
505 | ScenePresence sp = World.GetScenePresence(m_host.OwnerID); | ||
506 | if (!World.RegionInfo.EstateSettings.IsEstateManagerOrOwner(m_host.OwnerID) && (sp == null || sp.GodLevel < 200)) | ||
501 | { | 507 | { |
502 | LSShoutError("lsSetWindlightSceneTargeted can only be used by estate managers or owners."); | 508 | LSShoutError("lsSetWindlightSceneTargeted can only be used by estate managers or owners."); |
503 | return 0; | 509 | return 0; |