llName2Key. Thanks to mewtwo0641 and watcher64.
Signed-off-by: UbitUmarov <ajlduarte@sapo.pt>0.9.1.0-post-fixes
parent
7c8cf9f362
commit
06a35b9559
|
@ -6844,6 +6844,26 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
|
|||
return String.Empty;
|
||||
}
|
||||
|
||||
public LSL_Key llName2Key(string name)
|
||||
{
|
||||
m_host.AddScriptLPS(1);
|
||||
|
||||
foreach (ScenePresence sp in World.GetScenePresences())
|
||||
{
|
||||
string test = sp.ControllingClient.Name;
|
||||
if (!name.Contains(" "))
|
||||
test = test.Replace(" ", ".");
|
||||
|
||||
if (String.Compare(name, test, true) == 0)
|
||||
{
|
||||
if (!sp.IsNPC)
|
||||
return sp.UUID.ToString();
|
||||
}
|
||||
}
|
||||
|
||||
return UUID.Zero.ToString();
|
||||
}
|
||||
|
||||
|
||||
|
||||
public void llSetTextureAnim(int mode, int face, int sizex, int sizey, double start, double length, double rate)
|
||||
|
|
|
@ -225,6 +225,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api.Interfaces
|
|||
void llInstantMessage(string user, string message);
|
||||
LSL_String llIntegerToBase64(int number);
|
||||
LSL_String llKey2Name(string id);
|
||||
LSL_Key llName2Key(string name);
|
||||
LSL_String llGetUsername(string id);
|
||||
LSL_Key llRequestUsername(string id);
|
||||
LSL_String llGetDisplayName(string id);
|
||||
|
|
|
@ -961,6 +961,11 @@ namespace OpenSim.Region.ScriptEngine.Shared.ScriptBase
|
|||
return m_LSL_Functions.llKey2Name(id);
|
||||
}
|
||||
|
||||
public LSL_Key llName2Key(string name)
|
||||
{
|
||||
return m_LSL_Functions.llName2Key(name);
|
||||
}
|
||||
|
||||
public LSL_String llGetUsername(string id)
|
||||
{
|
||||
return m_LSL_Functions.llGetUsername(id);
|
||||
|
|
Loading…
Reference in New Issue