aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/ScriptEngine/Shared/Api/Implementation
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region/ScriptEngine/Shared/Api/Implementation')
-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)