From 4f3975f04e7bbaf7b7b8e286831714240ced5e6d Mon Sep 17 00:00:00 2001 From: Rob Smart Date: Fri, 18 Sep 2009 14:11:38 +0100 Subject: addition of a new script function osSetParcelSIPAddress(string SIPAddress), now including iVoiceModule This patch allows the land owner to dynamically set the SIP address of a particular land parcel from script. This allows predetermined SIP addresses to be used, making it easier to allow non OpenSim users to join a regions voice channel. Signed-off-by: dr scofield (aka dirk husemann) --- .../Shared/Api/Implementation/OSSL_Api.cs | 29 ++++++++++++++++++++++ 1 file changed, 29 insertions(+) (limited to 'OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs') diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs index 726b37a..ccdd4c5 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs @@ -1164,6 +1164,35 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api land.SetMediaUrl(url); } + + public void osSetParcelSIPAddress(string SIPAddress) + { + // What actually is the difference to the LL function? + // + CheckThreatLevel(ThreatLevel.VeryLow, "osSetParcelMediaURL"); + + m_host.AddScriptLPS(1); + + + ILandObject land + = World.LandChannel.GetLandObject(m_host.AbsolutePosition.X, m_host.AbsolutePosition.Y); + + if (land.landData.OwnerID != m_host.ObjectOwner) + { + OSSLError("osSetParcelSIPAddress: Sorry, you need to own the land to use this function"); + return; + } + + // get the voice module + IVoiceModule voiceModule = World.RequestModuleInterface(); + + if (voiceModule != null) + voiceModule.setLandSIPAddress(SIPAddress,land.landData.GlobalID); + else + OSSLError("osSetParcelSIPAddress: No voice module enabled for this land"); + + + } public string osGetScriptEngineName() { -- cgit v1.1