From 8d0aaa359fc47b7f9f46b1664f4e542dc6b578ef Mon Sep 17 00:00:00 2001 From: Justin Clark-Casey (justincc) Date: Tue, 15 Nov 2011 15:04:41 +0000 Subject: 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!) --- OpenSim/Region/CoreModules/Avatar/Friends/FriendsModule.cs | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'OpenSim') 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 List online = GetOnlineFriends(agentID); if (online.Count > 0) { - m_log.DebugFormat("[FRIENDS MODULE]: User {0} in region {1} has {2} friends online", client.AgentId, client.Scene.RegionInfo.RegionName, online.Count); + m_log.DebugFormat( + "[FRIENDS MODULE]: User {0} in region {1} has {2} friends online", + client.Name, client.Scene.RegionInfo.RegionName, online.Count); + client.SendAgentOnline(online.ToArray()); } @@ -806,16 +809,15 @@ namespace OpenSim.Region.CoreModules.Avatar.Friends if (onlineBitChanged) { if ((rights & (int)FriendRights.CanSeeOnline) == 1) - friendClient.SendAgentOnline(new UUID[] { new UUID(userID) }); + friendClient.SendAgentOnline(new UUID[] { userID }); else - friendClient.SendAgentOffline(new UUID[] { new UUID(userID) }); + friendClient.SendAgentOffline(new UUID[] { userID }); } else { bool canEditObjectsChanged = ((rights ^ userFlags) & (int)FriendRights.CanModifyObjects) != 0; if (canEditObjectsChanged) friendClient.SendChangeUserRights(userID, friendID, rights); - } // Update local cache -- cgit v1.1