aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region
diff options
context:
space:
mode:
authorDiva Canto2010-01-09 09:09:32 -0800
committerDiva Canto2010-01-09 09:09:32 -0800
commit25fdbd6cbcfc857c444042745d7d4fa8e495a982 (patch)
treed3b1479ca58d2348ba83b422dcfb5abb0bb58766 /OpenSim/Region
parentA few more inches... Old friends things removed. Less references to UserProfi... (diff)
downloadopensim-SC_OLD-25fdbd6cbcfc857c444042745d7d4fa8e495a982.zip
opensim-SC_OLD-25fdbd6cbcfc857c444042745d7d4fa8e495a982.tar.gz
opensim-SC_OLD-25fdbd6cbcfc857c444042745d7d4fa8e495a982.tar.bz2
opensim-SC_OLD-25fdbd6cbcfc857c444042745d7d4fa8e495a982.tar.xz
Less refs to UserProfileCacheService. Compiles but likely doesn't run.
Diffstat (limited to 'OpenSim/Region')
-rw-r--r--OpenSim/Region/CoreModules/Avatar/Combat/CombatModule.cs2
-rw-r--r--OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/InventoryArchiveReadRequest.cs2
-rw-r--r--OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/InventoryArchiveWriteRequest.cs2
-rw-r--r--OpenSim/Region/CoreModules/World/Estate/EstateManagementModule.cs15
-rw-r--r--OpenSim/Region/Framework/Scenes/Scene.PacketHandlers.cs20
-rw-r--r--OpenSim/Region/Framework/Scenes/Scene.cs34
6 files changed, 58 insertions, 17 deletions
diff --git a/OpenSim/Region/CoreModules/Avatar/Combat/CombatModule.cs b/OpenSim/Region/CoreModules/Avatar/Combat/CombatModule.cs
index 61b6d65..db94d2a 100644
--- a/OpenSim/Region/CoreModules/Avatar/Combat/CombatModule.cs
+++ b/OpenSim/Region/CoreModules/Avatar/Combat/CombatModule.cs
@@ -130,7 +130,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Combat.CombatModule
130 } 130 }
131 else 131 else
132 { 132 {
133 string killer = DeadAvatar.Scene.CommsManager.UUIDNameRequestString(part.OwnerID); 133 string killer = DeadAvatar.Scene.GetUserName(part.OwnerID);
134 DeadAvatar.ControllingClient.SendAgentAlertMessage("You impaled yourself on " + part.Name + " owned by " + killer +"!", true); 134 DeadAvatar.ControllingClient.SendAgentAlertMessage("You impaled yourself on " + part.Name + " owned by " + killer +"!", true);
135 } 135 }
136 //DeadAvatar.Scene. part.ObjectOwner 136 //DeadAvatar.Scene. part.ObjectOwner
diff --git a/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/InventoryArchiveReadRequest.cs b/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/InventoryArchiveReadRequest.cs
index 160a9bd..3417c87 100644
--- a/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/InventoryArchiveReadRequest.cs
+++ b/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/InventoryArchiveReadRequest.cs
@@ -357,7 +357,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver
357 // Don't use the item ID that's in the file 357 // Don't use the item ID that's in the file
358 item.ID = UUID.Random(); 358 item.ID = UUID.Random();
359 359
360 UUID ospResolvedId = OspResolver.ResolveOspa(item.CreatorId, m_scene.CommsManager); 360 UUID ospResolvedId = OspResolver.ResolveOspa(item.CreatorId, m_scene.UserAccountService);
361 if (UUID.Zero != ospResolvedId) 361 if (UUID.Zero != ospResolvedId)
362 { 362 {
363 item.CreatorIdAsUuid = ospResolvedId; 363 item.CreatorIdAsUuid = ospResolvedId;
diff --git a/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/InventoryArchiveWriteRequest.cs b/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/InventoryArchiveWriteRequest.cs
index 98b686e..8f75983 100644
--- a/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/InventoryArchiveWriteRequest.cs
+++ b/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/InventoryArchiveWriteRequest.cs
@@ -148,7 +148,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver
148 m_userUuids[inventoryItem.CreatorIdAsUuid] = 1; 148 m_userUuids[inventoryItem.CreatorIdAsUuid] = 1;
149 149
150 InventoryItemBase saveItem = (InventoryItemBase)inventoryItem.Clone(); 150 InventoryItemBase saveItem = (InventoryItemBase)inventoryItem.Clone();
151 saveItem.CreatorId = OspResolver.MakeOspa(saveItem.CreatorIdAsUuid, m_scene.CommsManager); 151 saveItem.CreatorId = OspResolver.MakeOspa(saveItem.CreatorIdAsUuid, m_scene.UserAccountService);
152 152
153 string serialization = UserInventoryItemSerializer.Serialize(saveItem); 153 string serialization = UserInventoryItemSerializer.Serialize(saveItem);
154 m_archiveWriter.WriteFile(filename, serialization); 154 m_archiveWriter.WriteFile(filename, serialization);
diff --git a/OpenSim/Region/CoreModules/World/Estate/EstateManagementModule.cs b/OpenSim/Region/CoreModules/World/Estate/EstateManagementModule.cs
index b1dcb14..5b82d4c 100644
--- a/OpenSim/Region/CoreModules/World/Estate/EstateManagementModule.cs
+++ b/OpenSim/Region/CoreModules/World/Estate/EstateManagementModule.cs
@@ -649,16 +649,9 @@ namespace OpenSim.Region.CoreModules.World.Estate
649 lsri.TaskID = sog.UUID; 649 lsri.TaskID = sog.UUID;
650 lsri.TaskLocalID = sog.LocalId; 650 lsri.TaskLocalID = sog.LocalId;
651 lsri.TaskName = sog.GetPartName(obj); 651 lsri.TaskName = sog.GetPartName(obj);
652 if (m_scene.CommsManager.UUIDNameCachedTest(sog.OwnerID)) 652 lsri.OwnerName = "waiting";
653 { 653 lock (uuidNameLookupList)
654 lsri.OwnerName = m_scene.CommsManager.UUIDNameRequestString(sog.OwnerID); 654 uuidNameLookupList.Add(sog.OwnerID);
655 }
656 else
657 {
658 lsri.OwnerName = "waiting";
659 lock (uuidNameLookupList)
660 uuidNameLookupList.Add(sog.OwnerID);
661 }
662 655
663 if (filter.Length != 0) 656 if (filter.Length != 0)
664 { 657 {
@@ -709,7 +702,7 @@ namespace OpenSim.Region.CoreModules.World.Estate
709 for (int i = 0; i < uuidarr.Length; i++) 702 for (int i = 0; i < uuidarr.Length; i++)
710 { 703 {
711 // string lookupname = m_scene.CommsManager.UUIDNameRequestString(uuidarr[i]); 704 // string lookupname = m_scene.CommsManager.UUIDNameRequestString(uuidarr[i]);
712 m_scene.CommsManager.UUIDNameRequestString(uuidarr[i]); 705 m_scene.GetUserName(uuidarr[i]);
713 // we drop it. It gets cached though... so we're ready for the next request. 706 // we drop it. It gets cached though... so we're ready for the next request.
714 } 707 }
715 } 708 }
diff --git a/OpenSim/Region/Framework/Scenes/Scene.PacketHandlers.cs b/OpenSim/Region/Framework/Scenes/Scene.PacketHandlers.cs
index 022d79d..139e0ca 100644
--- a/OpenSim/Region/Framework/Scenes/Scene.PacketHandlers.cs
+++ b/OpenSim/Region/Framework/Scenes/Scene.PacketHandlers.cs
@@ -33,6 +33,7 @@ using OpenMetaverse.Packets;
33using OpenSim.Framework; 33using OpenSim.Framework;
34using OpenSim.Framework.Communications; 34using OpenSim.Framework.Communications;
35using OpenSim.Framework.Communications.Cache; 35using OpenSim.Framework.Communications.Cache;
36using OpenSim.Services.Interfaces;
36 37
37namespace OpenSim.Region.Framework.Scenes 38namespace OpenSim.Region.Framework.Scenes
38{ 39{
@@ -415,7 +416,24 @@ namespace OpenSim.Region.Framework.Scenes
415 } 416 }
416 ); 417 );
417 } 418 }
418 419
420 public void HandleUUIDNameRequest(UUID uuid, IClientAPI remote_client)
421 {
422 if (uuid == CommsManager.UserProfileCacheService.LibraryRoot.Owner)
423 {
424 remote_client.SendNameReply(uuid, "Mr", "OpenSim");
425 }
426 else
427 {
428 string[] names = GetUserNames(uuid);
429 if (names.Length == 2)
430 {
431 remote_client.SendNameReply(uuid, names[0], names[1]);
432 }
433
434 }
435 }
436
419 /// <summary> 437 /// <summary>
420 /// Handle a fetch inventory request from the client 438 /// Handle a fetch inventory request from the client
421 /// </summary> 439 /// </summary>
diff --git a/OpenSim/Region/Framework/Scenes/Scene.cs b/OpenSim/Region/Framework/Scenes/Scene.cs
index ef62b79..90d476e 100644
--- a/OpenSim/Region/Framework/Scenes/Scene.cs
+++ b/OpenSim/Region/Framework/Scenes/Scene.cs
@@ -841,6 +841,36 @@ namespace OpenSim.Region.Framework.Scenes
841 return m_simulatorVersion; 841 return m_simulatorVersion;
842 } 842 }
843 843
844 public string[] GetUserNames(UUID uuid)
845 {
846 string[] returnstring = new string[0];
847
848 UserAccount account = UserAccountService.GetUserAccount(RegionInfo.ScopeID, uuid);
849
850 if (account != null)
851 {
852 returnstring = new string[2];
853 returnstring[0] = account.FirstName;
854 returnstring[1] = account.LastName;
855 }
856
857 return returnstring;
858 }
859
860 public string GetUserName(UUID uuid)
861 {
862 string[] names = GetUserNames(uuid);
863 if (names.Length == 2)
864 {
865 string firstname = names[0];
866 string lastname = names[1];
867
868 return firstname + " " + lastname;
869
870 }
871 return "(hippos)";
872 }
873
844 /// <summary> 874 /// <summary>
845 /// Another region is up. 875 /// Another region is up.
846 /// 876 ///
@@ -2804,7 +2834,7 @@ namespace OpenSim.Region.Framework.Scenes
2804 2834
2805 public virtual void SubscribeToClientGridEvents(IClientAPI client) 2835 public virtual void SubscribeToClientGridEvents(IClientAPI client)
2806 { 2836 {
2807 client.OnNameFromUUIDRequest += CommsManager.HandleUUIDNameRequest; 2837 client.OnNameFromUUIDRequest += HandleUUIDNameRequest;
2808 client.OnMoneyTransferRequest += ProcessMoneyTransferRequest; 2838 client.OnMoneyTransferRequest += ProcessMoneyTransferRequest;
2809 client.OnAvatarPickerRequest += ProcessAvatarPickerRequest; 2839 client.OnAvatarPickerRequest += ProcessAvatarPickerRequest;
2810 client.OnSetStartLocationRequest += SetHomeRezPoint; 2840 client.OnSetStartLocationRequest += SetHomeRezPoint;
@@ -2959,7 +2989,7 @@ namespace OpenSim.Region.Framework.Scenes
2959 2989
2960 public virtual void UnSubscribeToClientGridEvents(IClientAPI client) 2990 public virtual void UnSubscribeToClientGridEvents(IClientAPI client)
2961 { 2991 {
2962 client.OnNameFromUUIDRequest -= CommsManager.HandleUUIDNameRequest; 2992 client.OnNameFromUUIDRequest -= HandleUUIDNameRequest;
2963 client.OnMoneyTransferRequest -= ProcessMoneyTransferRequest; 2993 client.OnMoneyTransferRequest -= ProcessMoneyTransferRequest;
2964 client.OnAvatarPickerRequest -= ProcessAvatarPickerRequest; 2994 client.OnAvatarPickerRequest -= ProcessAvatarPickerRequest;
2965 client.OnSetStartLocationRequest -= SetHomeRezPoint; 2995 client.OnSetStartLocationRequest -= SetHomeRezPoint;