diff options
Diffstat (limited to 'OpenSim/Region/ScriptEngine/Shared/Api')
3 files changed, 36 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) |
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Interface/IOSSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Interface/IOSSL_Api.cs index 5ed628f..10478e8 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Interface/IOSSL_Api.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Interface/IOSSL_Api.cs | |||
@@ -138,6 +138,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api.Interfaces | |||
138 | int osRegionRestart(double seconds); | 138 | int osRegionRestart(double seconds); |
139 | int osRegionRestart(double seconds, string msg); | 139 | int osRegionRestart(double seconds, string msg); |
140 | void osRegionNotice(string msg); | 140 | void osRegionNotice(string msg); |
141 | void osRegionNotice(string agentID, string msg); | ||
141 | bool osConsoleCommand(string Command); | 142 | bool osConsoleCommand(string Command); |
142 | void osSetParcelMediaURL(string url); | 143 | void osSetParcelMediaURL(string url); |
143 | void osSetPrimFloatOnWater(int floatYN); | 144 | void osSetPrimFloatOnWater(int floatYN); |
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/OSSL_Stub.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/OSSL_Stub.cs index 5cf2cdb..5f7841e 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/OSSL_Stub.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/OSSL_Stub.cs | |||
@@ -225,6 +225,11 @@ namespace OpenSim.Region.ScriptEngine.Shared.ScriptBase | |||
225 | m_OSSL_Functions.osRegionNotice(msg); | 225 | m_OSSL_Functions.osRegionNotice(msg); |
226 | } | 226 | } |
227 | 227 | ||
228 | public void osRegionNotice(string agentID, string msg) | ||
229 | { | ||
230 | m_OSSL_Functions.osRegionNotice(agentID, msg); | ||
231 | } | ||
232 | |||
228 | public bool osConsoleCommand(string Command) | 233 | public bool osConsoleCommand(string Command) |
229 | { | 234 | { |
230 | return m_OSSL_Functions.osConsoleCommand(Command); | 235 | return m_OSSL_Functions.osConsoleCommand(Command); |