aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/CoreModules
diff options
context:
space:
mode:
authorJustin Clark-Casey (justincc)2011-11-15 15:04:41 +0000
committerJustin Clark-Casey (justincc)2011-11-15 15:05:10 +0000
commit8d0aaa359fc47b7f9f46b1664f4e542dc6b578ef (patch)
tree181e33ab176db683bc9befa39ccfb324c2225a22 /OpenSim/Region/CoreModules
parentAdd test for removing a friendship. (diff)
downloadopensim-SC_OLD-8d0aaa359fc47b7f9f46b1664f4e542dc6b578ef.zip
opensim-SC_OLD-8d0aaa359fc47b7f9f46b1664f4e542dc6b578ef.tar.gz
opensim-SC_OLD-8d0aaa359fc47b7f9f46b1664f4e542dc6b578ef.tar.bz2
opensim-SC_OLD-8d0aaa359fc47b7f9f46b1664f4e542dc6b578ef.tar.xz
refactor: Don't create a new UUID for passing uuids to client - UUIDs are structs are so not passed by reference (and they're immutable!)
Diffstat (limited to 'OpenSim/Region/CoreModules')
-rw-r--r--OpenSim/Region/CoreModules/Avatar/Friends/FriendsModule.cs10
1 files changed, 6 insertions, 4 deletions
diff --git a/OpenSim/Region/CoreModules/Avatar/Friends/FriendsModule.cs b/OpenSim/Region/CoreModules/Avatar/Friends/FriendsModule.cs
index 529d7cf..76d84ec 100644
--- a/OpenSim/Region/CoreModules/Avatar/Friends/FriendsModule.cs
+++ b/OpenSim/Region/CoreModules/Avatar/Friends/FriendsModule.cs
@@ -328,7 +328,10 @@ namespace OpenSim.Region.CoreModules.Avatar.Friends
328 List<UUID> online = GetOnlineFriends(agentID); 328 List<UUID> online = GetOnlineFriends(agentID);
329 if (online.Count > 0) 329 if (online.Count > 0)
330 { 330 {
331 m_log.DebugFormat("[FRIENDS MODULE]: User {0} in region {1} has {2} friends online", client.AgentId, client.Scene.RegionInfo.RegionName, online.Count); 331 m_log.DebugFormat(
332 "[FRIENDS MODULE]: User {0} in region {1} has {2} friends online",
333 client.Name, client.Scene.RegionInfo.RegionName, online.Count);
334
332 client.SendAgentOnline(online.ToArray()); 335 client.SendAgentOnline(online.ToArray());
333 } 336 }
334 337
@@ -806,16 +809,15 @@ namespace OpenSim.Region.CoreModules.Avatar.Friends
806 if (onlineBitChanged) 809 if (onlineBitChanged)
807 { 810 {
808 if ((rights & (int)FriendRights.CanSeeOnline) == 1) 811 if ((rights & (int)FriendRights.CanSeeOnline) == 1)
809 friendClient.SendAgentOnline(new UUID[] { new UUID(userID) }); 812 friendClient.SendAgentOnline(new UUID[] { userID });
810 else 813 else
811 friendClient.SendAgentOffline(new UUID[] { new UUID(userID) }); 814 friendClient.SendAgentOffline(new UUID[] { userID });
812 } 815 }
813 else 816 else
814 { 817 {
815 bool canEditObjectsChanged = ((rights ^ userFlags) & (int)FriendRights.CanModifyObjects) != 0; 818 bool canEditObjectsChanged = ((rights ^ userFlags) & (int)FriendRights.CanModifyObjects) != 0;
816 if (canEditObjectsChanged) 819 if (canEditObjectsChanged)
817 friendClient.SendChangeUserRights(userID, friendID, rights); 820 friendClient.SendChangeUserRights(userID, friendID, rights);
818
819 } 821 }
820 822
821 // Update local cache 823 // Update local cache