aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs')
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs60
1 files changed, 47 insertions, 13 deletions
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs
index f80dd51..4cb4b61 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;
48using OpenSim.Region.ScriptEngine.Interfaces; 48using OpenSim.Region.ScriptEngine.Interfaces;
49using OpenSim.Region.ScriptEngine.Shared.Api.Interfaces; 49using OpenSim.Region.ScriptEngine.Shared.Api.Interfaces;
50using TPFlags = OpenSim.Framework.Constants.TeleportFlags; 50using TPFlags = OpenSim.Framework.Constants.TeleportFlags;
51using OpenSim.Services.Interfaces;
52using GridRegion = OpenSim.Services.Interfaces.GridRegion;
51using System.Text.RegularExpressions; 53using System.Text.RegularExpressions;
52 54
53using LSL_Float = OpenSim.Region.ScriptEngine.Shared.LSL_Types.LSLFloat; 55using LSL_Float = OpenSim.Region.ScriptEngine.Shared.LSL_Types.LSLFloat;
@@ -591,7 +593,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
591 // agent must be over owners land to avoid abuse 593 // agent must be over owners land to avoid abuse
592 if (m_host.OwnerID 594 if (m_host.OwnerID
593 == World.LandChannel.GetLandObject( 595 == World.LandChannel.GetLandObject(
594 presence.AbsolutePosition.X, presence.AbsolutePosition.Y).landData.OwnerID) 596 presence.AbsolutePosition.X, presence.AbsolutePosition.Y).LandData.OwnerID)
595 { 597 {
596 598
597 // Check for hostname , attempt to make a hglink 599 // Check for hostname , attempt to make a hglink
@@ -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();
@@ -642,7 +647,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
642 // agent must be over owners land to avoid abuse 647 // agent must be over owners land to avoid abuse
643 if (m_host.OwnerID 648 if (m_host.OwnerID
644 == World.LandChannel.GetLandObject( 649 == World.LandChannel.GetLandObject(
645 presence.AbsolutePosition.X, presence.AbsolutePosition.Y).landData.OwnerID) 650 presence.AbsolutePosition.X, presence.AbsolutePosition.Y).LandData.OwnerID)
646 { 651 {
647 presence.ControllingClient.SendTeleportLocationStart(); 652 presence.ControllingClient.SendTeleportLocationStart();
648 World.RequestTeleportLocation(presence.ControllingClient, regionHandle, 653 World.RequestTeleportLocation(presence.ControllingClient, regionHandle,
@@ -1159,11 +1164,40 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
1159 ILandObject land 1164 ILandObject land
1160 = World.LandChannel.GetLandObject(m_host.AbsolutePosition.X, m_host.AbsolutePosition.Y); 1165 = World.LandChannel.GetLandObject(m_host.AbsolutePosition.X, m_host.AbsolutePosition.Y);
1161 1166
1162 if (land.landData.OwnerID != m_host.ObjectOwner) 1167 if (land.LandData.OwnerID != m_host.ObjectOwner)
1163 return; 1168 return;
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 {