Add osGetGridHomeURI function
Add osGetHomeURI function to the family of osGetGrid* functions. Returns the SRV_HomeURI setting from the [LoginService] configuration.iar_mods
parent
edb2e4c5b3
commit
8f871cca10
|
@ -1949,6 +1949,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
|
|||
Nick,
|
||||
Name,
|
||||
Login,
|
||||
Home,
|
||||
Custom
|
||||
};
|
||||
|
||||
|
@ -1990,6 +1991,10 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
|
|||
retval = json["login"];
|
||||
break;
|
||||
|
||||
case InfoType.Home:
|
||||
retval = json["home"];
|
||||
break;
|
||||
|
||||
case InfoType.Custom:
|
||||
retval = json[key];
|
||||
break;
|
||||
|
@ -2062,6 +2067,23 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
|
|||
return loginURI;
|
||||
}
|
||||
|
||||
public string osGetGridHomeURI()
|
||||
{
|
||||
CheckThreatLevel(ThreatLevel.Moderate, "osGetGridHomeURI");
|
||||
m_host.AddScriptLPS(1);
|
||||
|
||||
string HomeURI = String.Empty;
|
||||
IConfigSource config = m_ScriptEngine.ConfigSource;
|
||||
|
||||
if (config.Configs["LoginService"] != null)
|
||||
HomeURI = config.Configs["LoginService"].GetString("SRV_HomeURI", HomeURI);
|
||||
|
||||
if (String.IsNullOrEmpty(HomeURI))
|
||||
HomeURI = GridUserInfo(InfoType.Home);
|
||||
|
||||
return HomeURI;
|
||||
}
|
||||
|
||||
public string osGetGridCustom(string key)
|
||||
{
|
||||
CheckThreatLevel(ThreatLevel.Moderate, "osGetGridCustom");
|
||||
|
|
|
@ -160,6 +160,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api.Interfaces
|
|||
string osGetGridNick();
|
||||
string osGetGridName();
|
||||
string osGetGridLoginURI();
|
||||
string osGetGridHomeURI();
|
||||
string osGetGridCustom(string key);
|
||||
|
||||
LSL_String osFormatString(string str, LSL_List strings);
|
||||
|
|
|
@ -452,6 +452,11 @@ namespace OpenSim.Region.ScriptEngine.Shared.ScriptBase
|
|||
return m_OSSL_Functions.osGetGridLoginURI();
|
||||
}
|
||||
|
||||
public string osGetGridHomeURI()
|
||||
{
|
||||
return m_OSSL_Functions.osGetGridHomeURI();
|
||||
}
|
||||
|
||||
public string osGetGridCustom(string key)
|
||||
{
|
||||
return m_OSSL_Functions.osGetGridCustom(key);
|
||||
|
|
Loading…
Reference in New Issue