aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/ScriptEngine/Shared/Api/Implementation
diff options
context:
space:
mode:
authorDr Scofield2008-07-01 07:16:02 +0000
committerDr Scofield2008-07-01 07:16:02 +0000
commit5e63206018d6d24671ad59d77951082b77f02618 (patch)
tree28da5c8f920b1dc9afa83d8c68ceb5d6e43aee32 /OpenSim/Region/ScriptEngine/Shared/Api/Implementation
parentMantis#1639. Thank you, Melanie for a patch that: (diff)
downloadopensim-SC-5e63206018d6d24671ad59d77951082b77f02618.zip
opensim-SC-5e63206018d6d24671ad59d77951082b77f02618.tar.gz
opensim-SC-5e63206018d6d24671ad59d77951082b77f02618.tar.bz2
opensim-SC-5e63206018d6d24671ad59d77951082b77f02618.tar.xz
From: kurt taylor (krtaylor)
Another new OSSL function for returning the name of the script engine currently running, osGetScriptEngineName, added to both DotNet and XEngine OSSL API.
Diffstat (limited to 'OpenSim/Region/ScriptEngine/Shared/Api/Implementation')
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs26
1 files changed, 26 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}