aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs
diff options
context:
space:
mode:
authorUbitUmarov2018-08-30 14:51:07 +0100
committerUbitUmarov2018-08-30 14:51:07 +0100
commit9647a1e6c56f375635cb550806dbcf5b9ca9738c (patch)
treeda1f2a0a9d56a7f6fdc77c26bd9cefcc44ddefee /OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs
parentAdding check permission CanIssueEstateCommand for osRegionNotice and new func... (diff)
downloadopensim-SC-9647a1e6c56f375635cb550806dbcf5b9ca9738c.zip
opensim-SC-9647a1e6c56f375635cb550806dbcf5b9ca9738c.tar.gz
opensim-SC-9647a1e6c56f375635cb550806dbcf5b9ca9738c.tar.bz2
opensim-SC-9647a1e6c56f375635cb550806dbcf5b9ca9738c.tar.xz
minor changes to last patch
Diffstat (limited to 'OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs')
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs14
1 files changed, 7 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 b74490c..d2eecea 100644
--- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs
@@ -640,24 +640,24 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
640 dm.SendGeneralAlert(msg + "\n"); 640 dm.SendGeneralAlert(msg + "\n");
641 } 641 }
642 642
643 public void osRegionNotice(string agentID, string msg) 643 public void osRegionNotice(LSL_Key agentID, string msg)
644 { 644 {
645 CheckThreatLevel(ThreatLevel.High, "osRegionNotice"); 645 CheckThreatLevel(ThreatLevel.High, "osRegionNotice");
646 646
647 if (!UUID.TryParse(agentID, out UUID avatarID)) 647 if (!World.Permissions.CanIssueEstateCommand(m_host.OwnerID, false))
648 return; 648 return;
649 649
650 if (!World.TryGetScenePresence(avatarID, out ScenePresence sp)) 650 IDialogModule dm = World.RequestModuleInterface<IDialogModule>();
651 if (dm == null)
651 return; 652 return;
652 653
653 if (sp.IsChildAgent || sp.IsDeleted || sp.IsInTransit || sp.IsNPC) 654 if (!UUID.TryParse(agentID, out UUID avatarID))
654 return; 655 return;
655 656
656 IDialogModule dm = World.RequestModuleInterface<IDialogModule>(); 657 if (!World.TryGetScenePresence(avatarID, out ScenePresence sp))
657 if (dm == null)
658 return; 658 return;
659 659
660 if (!World.Permissions.CanIssueEstateCommand(m_host.OwnerID, false)) 660 if (sp.IsChildAgent || sp.IsDeleted || sp.IsInTransit || sp.IsNPC)
661 return; 661 return;
662 662
663 dm.SendAlertToUser(sp.ControllingClient, msg + "\n", false); 663 dm.SendAlertToUser(sp.ControllingClient, msg + "\n", false);