public LSL_Key llRequestUsername(LSL_Key uuid)
{
UUID userID = UUID.Zero;
if (!UUID.TryParse(uuid, out userID))
{
// => complain loudly, as specified by the LSL docs
ShoutError("Failed to parse uuid for avatar.");
return UUID.Zero.ToString();
}
DataserverPlugin dataserverPlugin = (DataserverPlugin)m_ScriptEngine.GetScriptPlugin("Dataserver");
UUID tid = dataserverPlugin.RegisterRequest(m_host.UUID, m_itemID, uuid.ToString());
Util.FireAndForget(delegate
{
string name = "";
UserAccount info = World.UserAccountService.GetUserAccount(World.RegionInfo.AllScopeIDs, userID);
if (info != null)
name = info.Name;
dataserverPlugin.AddReply(uuid.ToString(),
name, 100);
});
ScriptSleep(100);
return tid.ToString();
}