mirror of
https://github.com/opensim/opensim.git
synced 2026-08-01 14:16:07 +08:00
a few changes to ossl get grid uris and name
This commit is contained in:
@@ -2635,16 +2635,10 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
|
||||
{
|
||||
CheckThreatLevel(ThreatLevel.Moderate, "osGetGridName");
|
||||
|
||||
string name = String.Empty;
|
||||
IConfigSource config = m_ScriptEngine.ConfigSource;
|
||||
if(World.SceneGridInfo == null)
|
||||
return string.Empty;
|
||||
|
||||
if (config.Configs[GridInfoServiceConfigSectionName] != null)
|
||||
name = config.Configs[GridInfoServiceConfigSectionName].GetString("gridname", name);
|
||||
|
||||
if (String.IsNullOrEmpty(name))
|
||||
name = GridUserInfo(InfoType.Name);
|
||||
|
||||
return name;
|
||||
return World.SceneGridInfo.GridName;
|
||||
}
|
||||
|
||||
public string osGetGridLoginURI()
|
||||
@@ -2667,14 +2661,14 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
|
||||
{
|
||||
CheckThreatLevel(ThreatLevel.Moderate, "osGetGridHomeURI");
|
||||
|
||||
return World.SceneGridInfo.HGHomeURLNoEndSlash;
|
||||
return World.SceneGridInfo.HomeURLNoEndSlash;
|
||||
}
|
||||
|
||||
public string osGetGridGatekeeperURI()
|
||||
{
|
||||
CheckThreatLevel(ThreatLevel.Moderate, "osGetGridGatekeeperURI");
|
||||
|
||||
return World.SceneGridInfo.HGGateKeeperURLNoEndSlash;
|
||||
return World.SceneGridInfo.GateKeeperURLNoEndSlash;
|
||||
}
|
||||
|
||||
public string osGetGridCustom(string key)
|
||||
@@ -2706,21 +2700,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
|
||||
}
|
||||
|
||||
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 World.SceneGridInfo.HomeURLNoEndSlash;
|
||||
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user