diff options
author | Cinder | 2015-06-12 18:48:07 -0600 |
---|---|---|
committer | Diva Canto | 2015-06-13 07:27:42 -0700 |
commit | 0fa94f222df8ed7f308730c3692bf2a774138718 (patch) | |
tree | 560efc5542dea946a79dbbaebd39b991a67ede73 /OpenSim/Region/ScriptEngine | |
parent | Relicense AgentPreferences files to BSD and OpenSimulator (diff) | |
download | opensim-SC-0fa94f222df8ed7f308730c3692bf2a774138718.zip opensim-SC-0fa94f222df8ed7f308730c3692bf2a774138718.tar.gz opensim-SC-0fa94f222df8ed7f308730c3692bf2a774138718.tar.bz2 opensim-SC-0fa94f222df8ed7f308730c3692bf2a774138718.tar.xz |
Refactor AgentPreferences so that database operations happen centrally. the opensim way.
Signed-off-by: Diva Canto <diva@metaverseink.com>
Diffstat (limited to 'OpenSim/Region/ScriptEngine')
-rw-r--r-- | OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs | 10 |
1 files changed, 3 insertions, 7 deletions
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 | |||
6149 | { | 6149 | { |
6150 | // This should only return a value if the avatar is in the same region, but eh. idc. | 6150 | // This should only return a value if the avatar is in the same region, but eh. idc. |
6151 | m_host.AddScriptLPS(1); | 6151 | m_host.AddScriptLPS(1); |
6152 | IAgentPreferencesModule ap = World.RequestModuleInterface<IAgentPreferencesModule>(); | 6152 | UUID key = new UUID(); |
6153 | if (ap != null) | 6153 | if (UUID.TryParse(id, out key)) |
6154 | { | 6154 | { |
6155 | UUID key = new UUID(); | 6155 | return new LSL_String(World.AgentPreferencesService.GetLang(key)); |
6156 | if (UUID.TryParse(id, out key)) | ||
6157 | { | ||
6158 | return ap.GetLang(key); | ||
6159 | } | ||
6160 | } | 6156 | } |
6161 | return new LSL_String("en-us"); | 6157 | return new LSL_String("en-us"); |
6162 | } | 6158 | } |