aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs
diff options
context:
space:
mode:
authorChristopher2015-08-04 09:00:24 +0200
committerMelanie Thielker2015-08-04 18:09:13 +0200
commit86c426e5870a2b91831eeb86cb9372e18e43b6c7 (patch)
treeadf25e345881b90081601183905cbd29834e77a9 /OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs
parentMake osAvatarName2Key() able to get names from unknown HG users (diff)
downloadopensim-SC-86c426e5870a2b91831eeb86cb9372e18e43b6c7.zip
opensim-SC-86c426e5870a2b91831eeb86cb9372e18e43b6c7.tar.gz
opensim-SC-86c426e5870a2b91831eeb86cb9372e18e43b6c7.tar.bz2
opensim-SC-86c426e5870a2b91831eeb86cb9372e18e43b6c7.tar.xz
create osGetAvatarHomeURI
Signed-off-by: Melanie Thielker <melanie@t-data.com>
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");