aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Framework/Scenes/Scene.cs
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region/Framework/Scenes/Scene.cs')
-rw-r--r--OpenSim/Region/Framework/Scenes/Scene.cs40
1 files changed, 7 insertions, 33 deletions
diff --git a/OpenSim/Region/Framework/Scenes/Scene.cs b/OpenSim/Region/Framework/Scenes/Scene.cs
index 3eb4f3e..55fca9b 100644
--- a/OpenSim/Region/Framework/Scenes/Scene.cs
+++ b/OpenSim/Region/Framework/Scenes/Scene.cs
@@ -185,6 +185,8 @@ namespace OpenSim.Region.Framework.Scenes
185 private Timer m_mapGenerationTimer = new Timer(); 185 private Timer m_mapGenerationTimer = new Timer();
186 private bool m_generateMaptiles; 186 private bool m_generateMaptiles;
187 187
188 private Dictionary<UUID, string[]> m_UserNamesCache = new Dictionary<UUID, string[]>();
189
188 #endregion Fields 190 #endregion Fields
189 191
190 #region Properties 192 #region Properties
@@ -792,36 +794,6 @@ namespace OpenSim.Region.Framework.Scenes
792 return m_simulatorVersion; 794 return m_simulatorVersion;
793 } 795 }
794 796
795 public string[] GetUserNames(UUID uuid)
796 {
797 string[] returnstring = new string[0];
798
799 UserAccount account = UserAccountService.GetUserAccount(RegionInfo.ScopeID, uuid);
800
801 if (account != null)
802 {
803 returnstring = new string[2];
804 returnstring[0] = account.FirstName;
805 returnstring[1] = account.LastName;
806 }
807
808 return returnstring;
809 }
810
811 public string GetUserName(UUID uuid)
812 {
813 string[] names = GetUserNames(uuid);
814 if (names.Length == 2)
815 {
816 string firstname = names[0];
817 string lastname = names[1];
818
819 return firstname + " " + lastname;
820
821 }
822 return "(hippos)";
823 }
824
825 /// <summary> 797 /// <summary>
826 /// Another region is up. 798 /// Another region is up.
827 /// 799 ///
@@ -2808,7 +2780,7 @@ namespace OpenSim.Region.Framework.Scenes
2808 2780
2809 public virtual void SubscribeToClientGridEvents(IClientAPI client) 2781 public virtual void SubscribeToClientGridEvents(IClientAPI client)
2810 { 2782 {
2811 client.OnNameFromUUIDRequest += HandleUUIDNameRequest; 2783 //client.OnNameFromUUIDRequest += HandleUUIDNameRequest;
2812 client.OnMoneyTransferRequest += ProcessMoneyTransferRequest; 2784 client.OnMoneyTransferRequest += ProcessMoneyTransferRequest;
2813 client.OnAvatarPickerRequest += ProcessAvatarPickerRequest; 2785 client.OnAvatarPickerRequest += ProcessAvatarPickerRequest;
2814 client.OnSetStartLocationRequest += SetHomeRezPoint; 2786 client.OnSetStartLocationRequest += SetHomeRezPoint;
@@ -2935,7 +2907,7 @@ namespace OpenSim.Region.Framework.Scenes
2935 2907
2936 public virtual void UnSubscribeToClientGridEvents(IClientAPI client) 2908 public virtual void UnSubscribeToClientGridEvents(IClientAPI client)
2937 { 2909 {
2938 client.OnNameFromUUIDRequest -= HandleUUIDNameRequest; 2910 //client.OnNameFromUUIDRequest -= HandleUUIDNameRequest;
2939 client.OnMoneyTransferRequest -= ProcessMoneyTransferRequest; 2911 client.OnMoneyTransferRequest -= ProcessMoneyTransferRequest;
2940 client.OnAvatarPickerRequest -= ProcessAvatarPickerRequest; 2912 client.OnAvatarPickerRequest -= ProcessAvatarPickerRequest;
2941 client.OnSetStartLocationRequest -= SetHomeRezPoint; 2913 client.OnSetStartLocationRequest -= SetHomeRezPoint;
@@ -3152,7 +3124,6 @@ namespace OpenSim.Region.Framework.Scenes
3152 List<ulong> regions = new List<ulong>(avatar.KnownChildRegionHandles); 3124 List<ulong> regions = new List<ulong>(avatar.KnownChildRegionHandles);
3153 regions.Remove(RegionInfo.RegionHandle); 3125 regions.Remove(RegionInfo.RegionHandle);
3154 m_sceneGridService.SendCloseChildAgentConnections(agentID, regions); 3126 m_sceneGridService.SendCloseChildAgentConnections(agentID, regions);
3155
3156 } 3127 }
3157 m_eventManager.TriggerClientClosed(agentID, this); 3128 m_eventManager.TriggerClientClosed(agentID, this);
3158 } 3129 }
@@ -3164,6 +3135,9 @@ namespace OpenSim.Region.Framework.Scenes
3164 3135
3165 m_eventManager.TriggerOnRemovePresence(agentID); 3136 m_eventManager.TriggerOnRemovePresence(agentID);
3166 3137
3138 if (avatar != null && (!avatar.IsChildAgent))
3139 avatar.SaveChangedAttachments();
3140
3167 ForEachClient( 3141 ForEachClient(
3168 delegate(IClientAPI client) 3142 delegate(IClientAPI client)
3169 { 3143 {