diff options
Diffstat (limited to 'OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs')
-rw-r--r-- | OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs | 54 |
1 files changed, 44 insertions, 10 deletions
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs index 726b37a..0b95abc 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs | |||
@@ -48,6 +48,8 @@ using OpenSim.Region.ScriptEngine.Shared.ScriptBase; | |||
48 | using OpenSim.Region.ScriptEngine.Interfaces; | 48 | using OpenSim.Region.ScriptEngine.Interfaces; |
49 | using OpenSim.Region.ScriptEngine.Shared.Api.Interfaces; | 49 | using OpenSim.Region.ScriptEngine.Shared.Api.Interfaces; |
50 | using TPFlags = OpenSim.Framework.Constants.TeleportFlags; | 50 | using TPFlags = OpenSim.Framework.Constants.TeleportFlags; |
51 | using OpenSim.Services.Interfaces; | ||
52 | using GridRegion = OpenSim.Services.Interfaces.GridRegion; | ||
51 | using System.Text.RegularExpressions; | 53 | using System.Text.RegularExpressions; |
52 | 54 | ||
53 | using LSL_Float = OpenSim.Region.ScriptEngine.Shared.LSL_Types.LSLFloat; | 55 | using LSL_Float = OpenSim.Region.ScriptEngine.Shared.LSL_Types.LSLFloat; |
@@ -599,17 +601,20 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
599 | if (regionName.Contains(".") && regionName.Contains(":")) | 601 | if (regionName.Contains(".") && regionName.Contains(":")) |
600 | { | 602 | { |
601 | // Try to link the region | 603 | // Try to link the region |
602 | RegionInfo regInfo = HGHyperlink.TryLinkRegion(World, | 604 | IHyperlinkService hyperService = World.RequestModuleInterface<IHyperlinkService>(); |
603 | presence.ControllingClient, | 605 | if (hyperService != null) |
604 | regionName); | ||
605 | // Get the region name | ||
606 | if (regInfo != null) | ||
607 | { | 606 | { |
608 | regionName = regInfo.RegionName; | 607 | GridRegion regInfo = hyperService.TryLinkRegion(presence.ControllingClient, |
609 | } | 608 | regionName); |
610 | else | 609 | // Get the region name |
611 | { | 610 | if (regInfo != null) |
612 | // Might need to ping the client here in case of failure?? | 611 | { |
612 | regionName = regInfo.RegionName; | ||
613 | } | ||
614 | else | ||
615 | { | ||
616 | // Might need to ping the client here in case of failure?? | ||
617 | } | ||
613 | } | 618 | } |
614 | } | 619 | } |
615 | presence.ControllingClient.SendTeleportLocationStart(); | 620 | presence.ControllingClient.SendTeleportLocationStart(); |
@@ -1164,6 +1169,35 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
1164 | 1169 | ||
1165 | land.SetMediaUrl(url); | 1170 | land.SetMediaUrl(url); |
1166 | } | 1171 | } |
1172 | |||
1173 | public void osSetParcelSIPAddress(string SIPAddress) | ||
1174 | { | ||
1175 | // What actually is the difference to the LL function? | ||
1176 | // | ||
1177 | CheckThreatLevel(ThreatLevel.VeryLow, "osSetParcelMediaURL"); | ||
1178 | |||
1179 | m_host.AddScriptLPS(1); | ||
1180 | |||
1181 | |||
1182 | ILandObject land | ||
1183 | = World.LandChannel.GetLandObject(m_host.AbsolutePosition.X, m_host.AbsolutePosition.Y); | ||
1184 | |||
1185 | if (land.landData.OwnerID != m_host.ObjectOwner) | ||
1186 | { | ||
1187 | OSSLError("osSetParcelSIPAddress: Sorry, you need to own the land to use this function"); | ||
1188 | return; | ||
1189 | } | ||
1190 | |||
1191 | // get the voice module | ||
1192 | IVoiceModule voiceModule = World.RequestModuleInterface<IVoiceModule>(); | ||
1193 | |||
1194 | if (voiceModule != null) | ||
1195 | voiceModule.setLandSIPAddress(SIPAddress,land.landData.GlobalID); | ||
1196 | else | ||
1197 | OSSLError("osSetParcelSIPAddress: No voice module enabled for this land"); | ||
1198 | |||
1199 | |||
1200 | } | ||
1167 | 1201 | ||
1168 | public string osGetScriptEngineName() | 1202 | public string osGetScriptEngineName() |
1169 | { | 1203 | { |