From aa6c097cca1c75219aae4103041a303292663dfb Mon Sep 17 00:00:00 2001 From: Melanie Date: Mon, 24 Jan 2011 03:08:00 +0100 Subject: [PATCH] Complete country support --- OpenSim/Region/ScriptEngine/Shared/Helpers.cs | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/OpenSim/Region/ScriptEngine/Shared/Helpers.cs b/OpenSim/Region/ScriptEngine/Shared/Helpers.cs index 3575889d3c..e9edf6c519 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Helpers.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Helpers.cs @@ -35,6 +35,7 @@ using OpenMetaverse; using OpenSim.Framework; using OpenSim.Region.CoreModules; using OpenSim.Region.Framework.Scenes; +using OpenSim.Services.Interfaces; namespace OpenSim.Region.ScriptEngine.Shared { @@ -95,6 +96,7 @@ namespace OpenSim.Region.ScriptEngine.Shared Type = 0; Velocity = new LSL_Types.Vector3(); initializeSurfaceTouch(); + Country = String.Empty; } public UUID Key; @@ -126,6 +128,8 @@ namespace OpenSim.Region.ScriptEngine.Shared private int touchFace; public int TouchFace { get { return touchFace; } } + public string Country; + // This can be done in two places including the constructor // so be carefull what gets added here private void initializeSurfaceTouch() @@ -173,6 +177,10 @@ namespace OpenSim.Region.ScriptEngine.Shared return; Name = presence.Firstname + " " + presence.Lastname; + UserAccount account = scene.UserAccountService.GetUserAccount(scene.RegionInfo.ScopeID, Key); + if (account != null) + Country = account.UserCountry; + Owner = Key; Position = new LSL_Types.Vector3( presence.AbsolutePosition.X,