mirror of
https://github.com/opensim/opensim.git
synced 2026-08-05 00:46:02 +08:00
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) <drscofield@xyzzyxyzzy.net>
This commit is contained in:
committed by
dr scofield (aka dirk husemann)
parent
56edbe9b60
commit
4f3975f04e
@@ -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<IVoiceModule>();
|
||||
|
||||
if (voiceModule != null)
|
||||
voiceModule.setLandSIPAddress(SIPAddress,land.landData.GlobalID);
|
||||
else
|
||||
OSSLError("osSetParcelSIPAddress: No voice module enabled for this land");
|
||||
|
||||
|
||||
}
|
||||
|
||||
public string osGetScriptEngineName()
|
||||
{
|
||||
|
||||
@@ -75,6 +75,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api.Interfaces
|
||||
bool osConsoleCommand(string Command);
|
||||
void osSetParcelMediaURL(string url);
|
||||
void osSetPrimFloatOnWater(int floatYN);
|
||||
void osSetParcelSIPAddress(string SIPAddress);
|
||||
|
||||
// Avatar Info Commands
|
||||
string osGetAgentIP(string agent);
|
||||
|
||||
@@ -183,6 +183,11 @@ namespace OpenSim.Region.ScriptEngine.Shared.ScriptBase
|
||||
{
|
||||
m_OSSL_Functions.osSetParcelMediaURL(url);
|
||||
}
|
||||
|
||||
public void osSetParcelSIPAddress(string SIPAddress)
|
||||
{
|
||||
m_OSSL_Functions.osSetParcelSIPAddress(SIPAddress);
|
||||
}
|
||||
|
||||
public void osSetPrimFloatOnWater(int floatYN)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user