aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs
diff options
context:
space:
mode:
authorMandarinka Tasty2018-08-27 21:36:45 +0200
committerUbitUmarov2018-08-30 14:25:19 +0100
commit99a23421a87b7a988bfe4e986ee09d3938cdb149 (patch)
treed0a3a359af1f33a1d08e0cfd77735221d3bd18aa /OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs
parentadd the Smoke texture to Opensim Library (diff)
downloadopensim-SC-99a23421a87b7a988bfe4e986ee09d3938cdb149.zip
opensim-SC-99a23421a87b7a988bfe4e986ee09d3938cdb149.tar.gz
opensim-SC-99a23421a87b7a988bfe4e986ee09d3938cdb149.tar.bz2
opensim-SC-99a23421a87b7a988bfe4e986ee09d3938cdb149.tar.xz
Adding check permission CanIssueEstateCommand for osRegionNotice and new function osRegionNotice(string agentID, string msg)
Signed-off-by: UbitUmarov <ajlduarte@sapo.pt>
Diffstat (limited to 'OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs')
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs37
1 files changed, 30 insertions, 7 deletions
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs
index 505d4e5..b74490c 100644
--- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs
@@ -628,16 +628,39 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
628 628
629 public void osRegionNotice(string msg) 629 public void osRegionNotice(string msg)
630 { 630 {
631 // This implementation provides absolutely no security 631 CheckThreatLevel(ThreatLevel.High, "osRegionNotice");
632 // It's high griefing potential makes this classification
633 // necessary
634 //
635 CheckThreatLevel(ThreatLevel.VeryHigh, "osRegionNotice");
636 632
637 IDialogModule dm = World.RequestModuleInterface<IDialogModule>(); 633 IDialogModule dm = World.RequestModuleInterface<IDialogModule>();
634 if (dm == null)
635 return;
636
637 if (!World.Permissions.CanIssueEstateCommand(m_host.OwnerID, false))
638 return;
639
640 dm.SendGeneralAlert(msg + "\n");
641 }
642
643 public void osRegionNotice(string agentID, string msg)
644 {
645 CheckThreatLevel(ThreatLevel.High, "osRegionNotice");
646
647 if (!UUID.TryParse(agentID, out UUID avatarID))
648 return;
649
650 if (!World.TryGetScenePresence(avatarID, out ScenePresence sp))
651 return;
652
653 if (sp.IsChildAgent || sp.IsDeleted || sp.IsInTransit || sp.IsNPC)
654 return;
655
656 IDialogModule dm = World.RequestModuleInterface<IDialogModule>();
657 if (dm == null)
658 return;
659
660 if (!World.Permissions.CanIssueEstateCommand(m_host.OwnerID, false))
661 return;
638 662
639 if (dm != null) 663 dm.SendAlertToUser(sp.ControllingClient, msg + "\n", false);
640 dm.SendGeneralAlert(msg);
641 } 664 }
642 665
643 public void osSetRot(UUID target, Quaternion rotation) 666 public void osSetRot(UUID target, Quaternion rotation)