aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim')
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs33
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/Api/Interface/IOSSL_Api.cs2
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/Api/Runtime/OSSL_Stub.cs5
3 files changed, 40 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");
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Interface/IOSSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Interface/IOSSL_Api.cs
index d072528..6259b76 100644
--- a/OpenSim/Region/ScriptEngine/Shared/Api/Interface/IOSSL_Api.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/Api/Interface/IOSSL_Api.cs
@@ -283,6 +283,8 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api.Interfaces
283 string osGetGridGatekeeperURI(); 283 string osGetGridGatekeeperURI();
284 string osGetGridCustom(string key); 284 string osGetGridCustom(string key);
285 285
286 string osGetAvatarHomeURI(string uuid);
287
286 LSL_String osFormatString(string str, LSL_List strings); 288 LSL_String osFormatString(string str, LSL_List strings);
287 LSL_List osMatchString(string src, string pattern, int start); 289 LSL_List osMatchString(string src, string pattern, int start);
288 LSL_String osReplaceString(string src, string pattern, string replace, int count, int start); 290 LSL_String osReplaceString(string src, string pattern, string replace, int count, int start);
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/OSSL_Stub.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/OSSL_Stub.cs
index c5c55d6..a60f381 100644
--- a/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/OSSL_Stub.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/OSSL_Stub.cs
@@ -510,6 +510,11 @@ namespace OpenSim.Region.ScriptEngine.Shared.ScriptBase
510 return m_OSSL_Functions.osGetGridCustom(key); 510 return m_OSSL_Functions.osGetGridCustom(key);
511 } 511 }
512 512
513 public string osGetAvatarHomeURI(string uuid)
514 {
515 return m_OSSL_Functions.osGetAvatarHomeURI(uuid);
516 }
517
513 public LSL_String osFormatString(string str, LSL_List strings) 518 public LSL_String osFormatString(string str, LSL_List strings)
514 { 519 {
515 return m_OSSL_Functions.osFormatString(str, strings); 520 return m_OSSL_Functions.osFormatString(str, strings);