diff options
author | Rob Smart | 2009-09-18 14:11:38 +0100 |
---|---|---|
committer | dr scofield (aka dirk husemann) | 2009-09-18 15:47:15 +0200 |
commit | 4f3975f04e7bbaf7b7b8e286831714240ced5e6d (patch) | |
tree | af8d71400d65040b2f0c19beeaaad29ca7b340dd /OpenSim/Region/ScriptEngine | |
parent | Alternate algorithm for fixing avatar capsule tilt (Mantis #2905) (diff) | |
download | opensim-SC_OLD-4f3975f04e7bbaf7b7b8e286831714240ced5e6d.zip opensim-SC_OLD-4f3975f04e7bbaf7b7b8e286831714240ced5e6d.tar.gz opensim-SC_OLD-4f3975f04e7bbaf7b7b8e286831714240ced5e6d.tar.bz2 opensim-SC_OLD-4f3975f04e7bbaf7b7b8e286831714240ced5e6d.tar.xz |
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>
Diffstat (limited to 'OpenSim/Region/ScriptEngine')
3 files changed, 35 insertions, 0 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..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 | |||
1164 | 1164 | ||
1165 | land.SetMediaUrl(url); | 1165 | land.SetMediaUrl(url); |
1166 | } | 1166 | } |
1167 | |||
1168 | public void osSetParcelSIPAddress(string SIPAddress) | ||
1169 | { | ||
1170 | // What actually is the difference to the LL function? | ||
1171 | // | ||
1172 | CheckThreatLevel(ThreatLevel.VeryLow, "osSetParcelMediaURL"); | ||
1173 | |||
1174 | m_host.AddScriptLPS(1); | ||
1175 | |||
1176 | |||
1177 | ILandObject land | ||
1178 | = World.LandChannel.GetLandObject(m_host.AbsolutePosition.X, m_host.AbsolutePosition.Y); | ||
1179 | |||
1180 | if (land.landData.OwnerID != m_host.ObjectOwner) | ||
1181 | { | ||
1182 | OSSLError("osSetParcelSIPAddress: Sorry, you need to own the land to use this function"); | ||
1183 | return; | ||
1184 | } | ||
1185 | |||
1186 | // get the voice module | ||
1187 | IVoiceModule voiceModule = World.RequestModuleInterface<IVoiceModule>(); | ||
1188 | |||
1189 | if (voiceModule != null) | ||
1190 | voiceModule.setLandSIPAddress(SIPAddress,land.landData.GlobalID); | ||
1191 | else | ||
1192 | OSSLError("osSetParcelSIPAddress: No voice module enabled for this land"); | ||
1193 | |||
1194 | |||
1195 | } | ||
1167 | 1196 | ||
1168 | public string osGetScriptEngineName() | 1197 | public string osGetScriptEngineName() |
1169 | { | 1198 | { |
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Interface/IOSSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Interface/IOSSL_Api.cs index 49aa45a..d8d3c31 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Interface/IOSSL_Api.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Interface/IOSSL_Api.cs | |||
@@ -75,6 +75,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api.Interfaces | |||
75 | bool osConsoleCommand(string Command); | 75 | bool osConsoleCommand(string Command); |
76 | void osSetParcelMediaURL(string url); | 76 | void osSetParcelMediaURL(string url); |
77 | void osSetPrimFloatOnWater(int floatYN); | 77 | void osSetPrimFloatOnWater(int floatYN); |
78 | void osSetParcelSIPAddress(string SIPAddress); | ||
78 | 79 | ||
79 | // Avatar Info Commands | 80 | // Avatar Info Commands |
80 | string osGetAgentIP(string agent); | 81 | string osGetAgentIP(string agent); |
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/OSSL_Stub.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/OSSL_Stub.cs index 8f52d99..d0df390 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/OSSL_Stub.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/OSSL_Stub.cs | |||
@@ -183,6 +183,11 @@ namespace OpenSim.Region.ScriptEngine.Shared.ScriptBase | |||
183 | { | 183 | { |
184 | m_OSSL_Functions.osSetParcelMediaURL(url); | 184 | m_OSSL_Functions.osSetParcelMediaURL(url); |
185 | } | 185 | } |
186 | |||
187 | public void osSetParcelSIPAddress(string SIPAddress) | ||
188 | { | ||
189 | m_OSSL_Functions.osSetParcelSIPAddress(SIPAddress); | ||
190 | } | ||
186 | 191 | ||
187 | public void osSetPrimFloatOnWater(int floatYN) | 192 | public void osSetPrimFloatOnWater(int floatYN) |
188 | { | 193 | { |