aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/ScriptEngine
diff options
context:
space:
mode:
authorMandarinka Tasty2018-09-22 07:21:13 +0200
committerUbitUmarov2018-10-23 18:01:13 +0100
commit06a35b955944f3da8229b9e15ac3602a8de50654 (patch)
treea66673173e6131bf09e7d15e7b14e95c60c381a7 /OpenSim/Region/ScriptEngine
parentremove a dead module (diff)
downloadopensim-SC-06a35b955944f3da8229b9e15ac3602a8de50654.zip
opensim-SC-06a35b955944f3da8229b9e15ac3602a8de50654.tar.gz
opensim-SC-06a35b955944f3da8229b9e15ac3602a8de50654.tar.bz2
opensim-SC-06a35b955944f3da8229b9e15ac3602a8de50654.tar.xz
llName2Key. Thanks to mewtwo0641 and watcher64.
Signed-off-by: UbitUmarov <ajlduarte@sapo.pt>
Diffstat (limited to 'OpenSim/Region/ScriptEngine')
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs20
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/Api/Interface/ILSL_Api.cs1
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/Api/Runtime/LSL_Stub.cs5
3 files changed, 26 insertions, 0 deletions
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
index 6a61670..36f8a28 100644
--- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
@@ -6844,6 +6844,26 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
6844 return String.Empty; 6844 return String.Empty;
6845 } 6845 }
6846 6846
6847 public LSL_Key llName2Key(string name)
6848 {
6849 m_host.AddScriptLPS(1);
6850
6851 foreach (ScenePresence sp in World.GetScenePresences())
6852 {
6853 string test = sp.ControllingClient.Name;
6854 if (!name.Contains(" "))
6855 test = test.Replace(" ", ".");
6856
6857 if (String.Compare(name, test, true) == 0)
6858 {
6859 if (!sp.IsNPC)
6860 return sp.UUID.ToString();
6861 }
6862 }
6863
6864 return UUID.Zero.ToString();
6865 }
6866
6847 6867
6848 6868
6849 public void llSetTextureAnim(int mode, int face, int sizex, int sizey, double start, double length, double rate) 6869 public void llSetTextureAnim(int mode, int face, int sizex, int sizey, double start, double length, double rate)
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Interface/ILSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Interface/ILSL_Api.cs
index 11f6710..c924844 100644
--- a/OpenSim/Region/ScriptEngine/Shared/Api/Interface/ILSL_Api.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/Api/Interface/ILSL_Api.cs
@@ -225,6 +225,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api.Interfaces
225 void llInstantMessage(string user, string message); 225 void llInstantMessage(string user, string message);
226 LSL_String llIntegerToBase64(int number); 226 LSL_String llIntegerToBase64(int number);
227 LSL_String llKey2Name(string id); 227 LSL_String llKey2Name(string id);
228 LSL_Key llName2Key(string name);
228 LSL_String llGetUsername(string id); 229 LSL_String llGetUsername(string id);
229 LSL_Key llRequestUsername(string id); 230 LSL_Key llRequestUsername(string id);
230 LSL_String llGetDisplayName(string id); 231 LSL_String llGetDisplayName(string id);
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/LSL_Stub.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/LSL_Stub.cs
index cafcf37..10300d6 100644
--- a/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/LSL_Stub.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/LSL_Stub.cs
@@ -961,6 +961,11 @@ namespace OpenSim.Region.ScriptEngine.Shared.ScriptBase
961 return m_LSL_Functions.llKey2Name(id); 961 return m_LSL_Functions.llKey2Name(id);
962 } 962 }
963 963
964 public LSL_Key llName2Key(string name)
965 {
966 return m_LSL_Functions.llName2Key(name);
967 }
968
964 public LSL_String llGetUsername(string id) 969 public LSL_String llGetUsername(string id)
965 { 970 {
966 return m_LSL_Functions.llGetUsername(id); 971 return m_LSL_Functions.llGetUsername(id);