From 0fa94f222df8ed7f308730c3692bf2a774138718 Mon Sep 17 00:00:00 2001 From: Cinder Date: Fri, 12 Jun 2015 18:48:07 -0600 Subject: Refactor AgentPreferences so that database operations happen centrally. the opensim way. Signed-off-by: Diva Canto --- .../Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) (limited to 'OpenSim/Region/ScriptEngine/Shared/Api') diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs index b50f429..75b40af 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs @@ -6149,14 +6149,10 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api { // This should only return a value if the avatar is in the same region, but eh. idc. m_host.AddScriptLPS(1); - IAgentPreferencesModule ap = World.RequestModuleInterface(); - if (ap != null) + UUID key = new UUID(); + if (UUID.TryParse(id, out key)) { - UUID key = new UUID(); - if (UUID.TryParse(id, out key)) - { - return ap.GetLang(key); - } + return new LSL_String(World.AgentPreferencesService.GetLang(key)); } return new LSL_String("en-us"); } -- cgit v1.1