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!)
parent
b5a69833f8
commit
3068cc3618
|
@ -328,7 +328,10 @@ namespace OpenSim.Region.CoreModules.Avatar.Friends
|
||||||
List<UUID> online = GetOnlineFriends(agentID);
|
List<UUID> online = GetOnlineFriends(agentID);
|
||||||
if (online.Count > 0)
|
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());
|
client.SendAgentOnline(online.ToArray());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -814,16 +817,15 @@ namespace OpenSim.Region.CoreModules.Avatar.Friends
|
||||||
if (onlineBitChanged)
|
if (onlineBitChanged)
|
||||||
{
|
{
|
||||||
if ((rights & (int)FriendRights.CanSeeOnline) == 1)
|
if ((rights & (int)FriendRights.CanSeeOnline) == 1)
|
||||||
friendClient.SendAgentOnline(new UUID[] { new UUID(userID) });
|
friendClient.SendAgentOnline(new UUID[] { userID });
|
||||||
else
|
else
|
||||||
friendClient.SendAgentOffline(new UUID[] { new UUID(userID) });
|
friendClient.SendAgentOffline(new UUID[] { userID });
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
bool canEditObjectsChanged = ((rights ^ userFlags) & (int)FriendRights.CanModifyObjects) != 0;
|
bool canEditObjectsChanged = ((rights ^ userFlags) & (int)FriendRights.CanModifyObjects) != 0;
|
||||||
if (canEditObjectsChanged)
|
if (canEditObjectsChanged)
|
||||||
friendClient.SendChangeUserRights(userID, friendID, rights);
|
friendClient.SendChangeUserRights(userID, friendID, rights);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Update local cache
|
// Update local cache
|
||||||
|
|
Loading…
Reference in New Issue