diff options
author | Justin Clark-Casey (justincc) | 2014-01-18 01:39:45 +0000 |
---|---|---|
committer | Justin Clark-Casey (justincc) | 2014-01-18 01:39:45 +0000 |
commit | d466446df342a319b6d85f478c1ec873d3a6984c (patch) | |
tree | 195fae7da04aa280b20a129c666ecaa4f3be406f | |
parent | Remove redundant methods in FlotsamAssetCache (diff) | |
parent | Following on from 50ea2e0, only fetch scene presence for check if lightscript... (diff) | |
download | opensim-SC-d466446df342a319b6d85f478c1ec873d3a6984c.zip opensim-SC-d466446df342a319b6d85f478c1ec873d3a6984c.tar.gz opensim-SC-d466446df342a319b6d85f478c1ec873d3a6984c.tar.bz2 opensim-SC-d466446df342a319b6d85f478c1ec873d3a6984c.tar.xz |
Merge branch 'justincc-master'
Diffstat (limited to '')
-rw-r--r-- | CONTRIBUTORS.txt | 11 | ||||
-rw-r--r-- | OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LS_Api.cs | 51 |
2 files changed, 42 insertions, 20 deletions
diff --git a/CONTRIBUTORS.txt b/CONTRIBUTORS.txt index 9114fc5..6fa116d 100644 --- a/CONTRIBUTORS.txt +++ b/CONTRIBUTORS.txt | |||
@@ -1,5 +1,4 @@ | |||
1 | <<<>>>>The following people have contributed to OpenSim (Thank you | 1 | The following people have contributed to OpenSim (Thank you for your effort!) |
2 | for your effort!) | ||
3 | 2 | ||
4 | = Current OpenSim Developers (in very rough order of appearance) = | 3 | = Current OpenSim Developers (in very rough order of appearance) = |
5 | These folks represent the current core team for OpenSim, and are the | 4 | These folks represent the current core team for OpenSim, and are the |
@@ -61,8 +60,9 @@ where we are today. | |||
61 | These folks have contributed code patches or content to OpenSimulator to help make it | 60 | These folks have contributed code patches or content to OpenSimulator to help make it |
62 | what it is today. | 61 | what it is today. |
63 | 62 | ||
64 | * aduffy70 | ||
65 | * A_Biondi | 63 | * A_Biondi |
64 | * aduffy70 | ||
65 | * Ai Austin | ||
66 | * alex_carnell | 66 | * alex_carnell |
67 | * Alan Webb (IBM) | 67 | * Alan Webb (IBM) |
68 | * Aleric | 68 | * Aleric |
@@ -173,23 +173,18 @@ what it is today. | |||
173 | * Zha Ewry | 173 | * Zha Ewry |
174 | * ziah | 174 | * ziah |
175 | 175 | ||
176 | |||
177 | = LSL Devs = | 176 | = LSL Devs = |
178 | |||
179 | * Alondria | 177 | * Alondria |
180 | * CharlieO | 178 | * CharlieO |
181 | * Tedd | 179 | * Tedd |
182 | * Melanie Thielker | 180 | * Melanie Thielker |
183 | 181 | ||
184 | |||
185 | = Testers = | 182 | = Testers = |
186 | |||
187 | * Ai Austin | 183 | * Ai Austin |
188 | * CharlieO (LSL) | 184 | * CharlieO (LSL) |
189 | * Ckrinke | 185 | * Ckrinke |
190 | * openlifegrid.com | 186 | * openlifegrid.com |
191 | 187 | ||
192 | |||
193 | This software uses components from the following developers: | 188 | This software uses components from the following developers: |
194 | * Sleepycat Software (Berkeley DB) | 189 | * Sleepycat Software (Berkeley DB) |
195 | * Aurora-Sim (http://aurora-sim.org) | 190 | * Aurora-Sim (http://aurora-sim.org) |
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LS_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LS_Api.cs index 1d6cb6d..b13a5ae 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LS_Api.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LS_Api.cs | |||
@@ -434,6 +434,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
434 | } | 434 | } |
435 | return wl; | 435 | return wl; |
436 | } | 436 | } |
437 | |||
437 | /// <summary> | 438 | /// <summary> |
438 | /// Set the current Windlight scene | 439 | /// Set the current Windlight scene |
439 | /// </summary> | 440 | /// </summary> |
@@ -446,13 +447,21 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
446 | LSShoutError("LightShare functions are not enabled."); | 447 | LSShoutError("LightShare functions are not enabled."); |
447 | return 0; | 448 | return 0; |
448 | } | 449 | } |
449 | if (!World.RegionInfo.EstateSettings.IsEstateManagerOrOwner(m_host.OwnerID) && World.GetScenePresence(m_host.OwnerID).GodLevel < 200) | 450 | |
451 | if (!World.RegionInfo.EstateSettings.IsEstateManagerOrOwner(m_host.OwnerID)) | ||
450 | { | 452 | { |
451 | LSShoutError("lsSetWindlightScene can only be used by estate managers or owners."); | 453 | ScenePresence sp = World.GetScenePresence(m_host.OwnerID); |
452 | return 0; | 454 | |
455 | if (sp == null || sp.GodLevel < 200) | ||
456 | { | ||
457 | LSShoutError("lsSetWindlightScene can only be used by estate managers or owners."); | ||
458 | return 0; | ||
459 | } | ||
453 | } | 460 | } |
461 | |||
454 | int success = 0; | 462 | int success = 0; |
455 | m_host.AddScriptLPS(1); | 463 | m_host.AddScriptLPS(1); |
464 | |||
456 | if (LightShareModule.EnableWindlight) | 465 | if (LightShareModule.EnableWindlight) |
457 | { | 466 | { |
458 | RegionLightShareData wl = getWindlightProfileFromRules(rules); | 467 | RegionLightShareData wl = getWindlightProfileFromRules(rules); |
@@ -465,8 +474,10 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
465 | LSShoutError("Windlight module is disabled"); | 474 | LSShoutError("Windlight module is disabled"); |
466 | return 0; | 475 | return 0; |
467 | } | 476 | } |
477 | |||
468 | return success; | 478 | return success; |
469 | } | 479 | } |
480 | |||
470 | public void lsClearWindlightScene() | 481 | public void lsClearWindlightScene() |
471 | { | 482 | { |
472 | if (!m_LSFunctionsEnabled) | 483 | if (!m_LSFunctionsEnabled) |
@@ -474,17 +485,25 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
474 | LSShoutError("LightShare functions are not enabled."); | 485 | LSShoutError("LightShare functions are not enabled."); |
475 | return; | 486 | return; |
476 | } | 487 | } |
477 | if (!World.RegionInfo.EstateSettings.IsEstateManagerOrOwner(m_host.OwnerID) && World.GetScenePresence(m_host.OwnerID).GodLevel < 200) | 488 | |
489 | if (!World.RegionInfo.EstateSettings.IsEstateManagerOrOwner(m_host.OwnerID)) | ||
478 | { | 490 | { |
479 | LSShoutError("lsSetWindlightScene can only be used by estate managers or owners."); | 491 | ScenePresence sp = World.GetScenePresence(m_host.OwnerID); |
480 | return; | 492 | |
493 | if (sp == null || sp.GodLevel < 200) | ||
494 | { | ||
495 | LSShoutError("lsSetWindlightScene can only be used by estate managers or owners."); | ||
496 | return; | ||
497 | } | ||
481 | } | 498 | } |
482 | 499 | ||
483 | m_host.ParentGroup.Scene.RegionInfo.WindlightSettings.valid = false; | 500 | m_host.ParentGroup.Scene.RegionInfo.WindlightSettings.valid = false; |
484 | if (m_host.ParentGroup.Scene.SimulationDataService != null) | 501 | if (m_host.ParentGroup.Scene.SimulationDataService != null) |
485 | m_host.ParentGroup.Scene.SimulationDataService.RemoveRegionWindlightSettings(m_host.ParentGroup.Scene.RegionInfo.RegionID); | 502 | m_host.ParentGroup.Scene.SimulationDataService.RemoveRegionWindlightSettings(m_host.ParentGroup.Scene.RegionInfo.RegionID); |
503 | |||
486 | m_host.ParentGroup.Scene.EventManager.TriggerOnSaveNewWindlightProfile(); | 504 | m_host.ParentGroup.Scene.EventManager.TriggerOnSaveNewWindlightProfile(); |
487 | } | 505 | } |
506 | |||
488 | /// <summary> | 507 | /// <summary> |
489 | /// Set the current Windlight scene to a target avatar | 508 | /// Set the current Windlight scene to a target avatar |
490 | /// </summary> | 509 | /// </summary> |
@@ -497,13 +516,21 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
497 | LSShoutError("LightShare functions are not enabled."); | 516 | LSShoutError("LightShare functions are not enabled."); |
498 | return 0; | 517 | return 0; |
499 | } | 518 | } |
500 | if (!World.RegionInfo.EstateSettings.IsEstateManagerOrOwner(m_host.OwnerID) && World.GetScenePresence(m_host.OwnerID).GodLevel < 200) | 519 | |
520 | if (!World.RegionInfo.EstateSettings.IsEstateManagerOrOwner(m_host.OwnerID)) | ||
501 | { | 521 | { |
502 | LSShoutError("lsSetWindlightSceneTargeted can only be used by estate managers or owners."); | 522 | ScenePresence sp = World.GetScenePresence(m_host.OwnerID); |
503 | return 0; | 523 | |
524 | if (sp == null || sp.GodLevel < 200) | ||
525 | { | ||
526 | LSShoutError("lsSetWindlightSceneTargeted can only be used by estate managers or owners."); | ||
527 | return 0; | ||
528 | } | ||
504 | } | 529 | } |
530 | |||
505 | int success = 0; | 531 | int success = 0; |
506 | m_host.AddScriptLPS(1); | 532 | m_host.AddScriptLPS(1); |
533 | |||
507 | if (LightShareModule.EnableWindlight) | 534 | if (LightShareModule.EnableWindlight) |
508 | { | 535 | { |
509 | RegionLightShareData wl = getWindlightProfileFromRules(rules); | 536 | RegionLightShareData wl = getWindlightProfileFromRules(rules); |
@@ -515,8 +542,8 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
515 | LSShoutError("Windlight module is disabled"); | 542 | LSShoutError("Windlight module is disabled"); |
516 | return 0; | 543 | return 0; |
517 | } | 544 | } |
545 | |||
518 | return success; | 546 | return success; |
519 | } | 547 | } |
520 | |||
521 | } | 548 | } |
522 | } | 549 | } \ No newline at end of file |