aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs')
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs33
1 files changed, 33 insertions, 0 deletions
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs
index 0461e1a..1c404bb 100644
--- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs
@@ -2318,6 +2318,39 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
2318 return retval; 2318 return retval;
2319 } 2319 }
2320 2320
2321 public string osGetAvatarHomeURI(string uuid)
2322 {
2323 CheckThreatLevel(ThreatLevel.Low, "osGetAvatarHomeURI");
2324 m_host.AddScriptLPS(1);
2325
2326 IUserManagement userManager = m_ScriptEngine.World.RequestModuleInterface<IUserManagement>();
2327 string returnValue = "";
2328
2329 if (userManager != null)
2330 {
2331 returnValue = userManager.GetUserServerURL(new UUID(uuid), "HomeURI");
2332 }
2333
2334 if (returnValue == "")
2335 {
2336 IConfigSource config = m_ScriptEngine.ConfigSource;
2337 returnValue = Util.GetConfigVarFromSections<string>(config, "HomeURI",
2338 new string[] { "Startup", "Hypergrid" }, String.Empty);
2339
2340 if (!string.IsNullOrEmpty(returnValue))
2341 return returnValue;
2342
2343 // Legacy. Remove soon!
2344 if (config.Configs["LoginService"] != null)
2345 returnValue = config.Configs["LoginService"].GetString("SRV_HomeURI", returnValue);
2346
2347 if (String.IsNullOrEmpty(returnValue))
2348 returnValue = GridUserInfo(InfoType.Home);
2349 }
2350
2351 return returnValue;
2352 }
2353
2321 public LSL_String osFormatString(string str, LSL_List strings) 2354 public LSL_String osFormatString(string str, LSL_List strings)
2322 { 2355 {
2323 CheckThreatLevel(ThreatLevel.VeryLow, "osFormatString"); 2356 CheckThreatLevel(ThreatLevel.VeryLow, "osFormatString");