create osGetAvatarHomeURI
Signed-off-by: Melanie Thielker <melanie@t-data.com>0.8.2-post-fixes
parent
b5be5ca490
commit
86c426e587
|
@ -2318,6 +2318,39 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
|
|||
return retval;
|
||||
}
|
||||
|
||||
public string osGetAvatarHomeURI(string uuid)
|
||||
{
|
||||
CheckThreatLevel(ThreatLevel.Low, "osGetAvatarHomeURI");
|
||||
m_host.AddScriptLPS(1);
|
||||
|
||||
IUserManagement userManager = m_ScriptEngine.World.RequestModuleInterface<IUserManagement>();
|
||||
string returnValue = "";
|
||||
|
||||
if (userManager != null)
|
||||
{
|
||||
returnValue = userManager.GetUserServerURL(new UUID(uuid), "HomeURI");
|
||||
}
|
||||
|
||||
if (returnValue == "")
|
||||
{
|
||||
IConfigSource config = m_ScriptEngine.ConfigSource;
|
||||
returnValue = Util.GetConfigVarFromSections<string>(config, "HomeURI",
|
||||
new string[] { "Startup", "Hypergrid" }, String.Empty);
|
||||
|
||||
if (!string.IsNullOrEmpty(returnValue))
|
||||
return returnValue;
|
||||
|
||||
// Legacy. Remove soon!
|
||||
if (config.Configs["LoginService"] != null)
|
||||
returnValue = config.Configs["LoginService"].GetString("SRV_HomeURI", returnValue);
|
||||
|
||||
if (String.IsNullOrEmpty(returnValue))
|
||||
returnValue = GridUserInfo(InfoType.Home);
|
||||
}
|
||||
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
public LSL_String osFormatString(string str, LSL_List strings)
|
||||
{
|
||||
CheckThreatLevel(ThreatLevel.VeryLow, "osFormatString");
|
||||
|
|
|
@ -283,6 +283,8 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api.Interfaces
|
|||
string osGetGridGatekeeperURI();
|
||||
string osGetGridCustom(string key);
|
||||
|
||||
string osGetAvatarHomeURI(string uuid);
|
||||
|
||||
LSL_String osFormatString(string str, LSL_List strings);
|
||||
LSL_List osMatchString(string src, string pattern, int start);
|
||||
LSL_String osReplaceString(string src, string pattern, string replace, int count, int start);
|
||||
|
|
|
@ -510,6 +510,11 @@ namespace OpenSim.Region.ScriptEngine.Shared.ScriptBase
|
|||
return m_OSSL_Functions.osGetGridCustom(key);
|
||||
}
|
||||
|
||||
public string osGetAvatarHomeURI(string uuid)
|
||||
{
|
||||
return m_OSSL_Functions.osGetAvatarHomeURI(uuid);
|
||||
}
|
||||
|
||||
public LSL_String osFormatString(string str, LSL_List strings)
|
||||
{
|
||||
return m_OSSL_Functions.osFormatString(str, strings);
|
||||
|
|
|
@ -137,6 +137,7 @@
|
|||
Allow_osLoadedCreationTime = ${XEngine|osslParcelOG}ESTATE_MANAGER,ESTATE_OWNER
|
||||
Allow_osMessageObject = ${XEngine|osslParcelOG}ESTATE_MANAGER,ESTATE_OWNER
|
||||
Allow_osRegexIsMatch = true
|
||||
Allow_osGetAvatarHomeURI = ${XEngine|osslParcelOG}ESTATE_MANAGER,ESTATE_OWNER
|
||||
|
||||
; ThreatLevel Moderate
|
||||
Allow_osDropAttachment = ${XEngine|osslParcelO}ESTATE_MANAGER,ESTATE_OWNER
|
||||
|
|
Loading…
Reference in New Issue