aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/ScriptEngine/Shared/Api
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region/ScriptEngine/Shared/Api')
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs26
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/Api/Interface/IOSSL_Api.cs2
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/Api/Runtime/OSSL_Stub.cs5
3 files changed, 33 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 dbb78a4..5414b95 100644
--- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs
@@ -549,5 +549,31 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
549 { 549 {
550 throw new Exception("OSSL Runtime Error: " + msg); 550 throw new Exception("OSSL Runtime Error: " + msg);
551 } 551 }
552
553 public string osGetScriptEngineName()
554 {
555 m_host.AddScriptLPS(1);
556
557 int scriptEngineNameIndex = 0;
558
559 if (!String.IsNullOrEmpty(m_ScriptEngine.ScriptEngineName))
560 {
561 // parse off the "ScriptEngine."
562 scriptEngineNameIndex = m_ScriptEngine.ScriptEngineName.IndexOf(".", scriptEngineNameIndex);
563 scriptEngineNameIndex++; // get past delimiter
564
565 int scriptEngineNameLength = m_ScriptEngine.ScriptEngineName.Length - scriptEngineNameIndex;
566
567 // create char array then a string that is only the script engine name
568 Char[] scriptEngineNameCharArray = m_ScriptEngine.ScriptEngineName.ToCharArray(scriptEngineNameIndex, scriptEngineNameLength);
569 String scriptEngineName = new String(scriptEngineNameCharArray);
570
571 return scriptEngineName;
572 }
573 else
574 {
575 return String.Empty;
576 }
577 }
552 } 578 }
553} 579}
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Interface/IOSSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Interface/IOSSL_Api.cs
index 1e14c63..d55491c 100644
--- a/OpenSim/Region/ScriptEngine/Shared/Api/Interface/IOSSL_Api.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/Api/Interface/IOSSL_Api.cs
@@ -64,5 +64,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api.Interfaces
64 64
65 double osList2Double(LSL_Types.list src, int index); 65 double osList2Double(LSL_Types.list src, int index);
66 void osSetRegionWaterHeight(double height); 66 void osSetRegionWaterHeight(double height);
67
68 string osGetScriptEngineName();
67 } 69 }
68} 70}
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/OSSL_Stub.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/OSSL_Stub.cs
index 34e2fb1..90c4419 100644
--- a/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/OSSL_Stub.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/OSSL_Stub.cs
@@ -195,5 +195,10 @@ namespace OpenSim.Region.ScriptEngine.Shared.ScriptBase
195 { 195 {
196 m_OSSL_Functions.osSetStateEvents(events); 196 m_OSSL_Functions.osSetStateEvents(events);
197 } 197 }
198
199 public string osGetScriptEngineName()
200 {
201 return m_OSSL_Functions.osGetScriptEngineName();
202 }
198 } 203 }
199} 204}