diff --git a/OpenSim/Region/ClientStack/Linden/Caps/BunchOfCaps/BunchOfCaps.cs b/OpenSim/Region/ClientStack/Linden/Caps/BunchOfCaps/BunchOfCaps.cs index 15d32d18c3..effd91239a 100644 --- a/OpenSim/Region/ClientStack/Linden/Caps/BunchOfCaps/BunchOfCaps.cs +++ b/OpenSim/Region/ClientStack/Linden/Caps/BunchOfCaps/BunchOfCaps.cs @@ -1320,14 +1320,14 @@ namespace OpenSim.Region.ClientStack.Linden m_Scene.TryGetClient(agentID, out client); - if (objectID != UUID.Zero) + if (!objectID.IsZero()) { SceneObjectPart part = m_Scene.GetSceneObjectPart(objectID); if(part == null) throw new Exception("failed to find object with notecard item" + notecardID.ToString()); TaskInventoryItem taskItem = part.Inventory.GetInventoryItem(notecardID); - if (taskItem == null || taskItem.AssetID == UUID.Zero) + if (taskItem == null || taskItem.AssetID.IsZero()) throw new Exception("Failed to find notecard item" + notecardID.ToString()); if (!m_Scene.Permissions.CanCopyObjectInventory(notecardID, objectID, agentID)) @@ -1352,10 +1352,10 @@ namespace OpenSim.Region.ClientStack.Linden return; } - if (notecardID != UUID.Zero) + if (!notecardID.IsZero()) { InventoryItemBase noteItem = m_Scene.InventoryService.GetItem(agentID, notecardID); - if (noteItem == null || noteItem.AssetID == UUID.Zero) + if (noteItem == null || noteItem.AssetID.IsZero()) throw new Exception("Failed to find notecard item" + notecardID.ToString()); noteAssetID = noteItem.AssetID; } @@ -1385,7 +1385,7 @@ namespace OpenSim.Region.ClientStack.Linden // find where to put it InventoryFolderBase folder = null; - if (folderID != UUID.Zero) + if (!folderID.IsZero()) folder = m_Scene.InventoryService.GetFolder(agentID, folderID); if (folder == null && Enum.IsDefined(typeof(FolderType), (sbyte)item.AssetType)) diff --git a/OpenSim/Region/CoreModules/Avatar/Friends/HGFriendsModule.cs b/OpenSim/Region/CoreModules/Avatar/Friends/HGFriendsModule.cs index 6bdd2200a1..788e67e4aa 100644 --- a/OpenSim/Region/CoreModules/Avatar/Friends/HGFriendsModule.cs +++ b/OpenSim/Region/CoreModules/Avatar/Friends/HGFriendsModule.cs @@ -181,9 +181,9 @@ namespace OpenSim.Region.CoreModules.Avatar.Friends { if (!UUID.TryParse(finfo.Friend, out UUID id)) { - if (Util.ParseUniversalUserIdentifier(finfo.Friend, out id, out string url, out string first, out string last, out string tmp)) + if (Util.ParseFullUniversalUserIdentifier(finfo.Friend, out id, out string url, out string first, out string last)) { -// m_log.DebugFormat("[HGFRIENDS MODULE]: caching {0}", finfo.Friend); + //m_log.DebugFormat("[HGFRIENDS MODULE]: caching {0}", finfo.Friend); uMan.AddUser(id,first,last, url); } } @@ -272,8 +272,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Friends else { // it's a foreign friend - string url = string.Empty, tmp = string.Empty; - if (Util.ParseUniversalUserIdentifier(friend.Friend, out friendID, out url, out tmp, out tmp, out tmp)) + if (Util.ParseUniversalUserIdentifier(friend.Friend, out friendID, out string url)) { // Let's try our luck in the local sim. Who knows, maybe it's here if (LocalStatusNotification(userID, friendID, online)) @@ -303,7 +302,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Friends return true; // fid is not a UUID... - if (Util.ParseUniversalUserIdentifier(fid, out agentID, out string url, out string f, out string l, out string tmp)) + if (Util.ParseFullUniversalUserIdentifier(fid, out agentID, out string url, out string f, out string l)) { if (agentID.IsNotZero()) { @@ -515,8 +514,8 @@ namespace OpenSim.Region.CoreModules.Avatar.Friends theFriendUUID = friendUUI; // If it's confirming the friendship, we already have the full UUI with the secret - if (Util.ParseUniversalUserIdentifier(theFriendUUID, out UUID utmp, out string url, - out string first, out string last, out secret)) + if (Util.ParseFullUniversalUserIdentifier(theFriendUUID, out UUID utmp, out string url, + out string first, out string last)) { agentUUID = agentUUI + ";" + secret; m_uMan.AddUser(utmp, first, last, url); @@ -757,9 +756,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Friends private void Delete(UUID foreignUser, UUID localUser, string uui) { - UUID id; - string url = string.Empty, secret = string.Empty, tmp = string.Empty; - if (Util.ParseUniversalUserIdentifier(uui, out id, out url, out tmp, out tmp, out secret)) + if (Util.ParseFullUniversalUserIdentifier(uui, out UUID id, out string url, out string tmp, out string tmp1, out string secret)) { m_log.DebugFormat("[HGFRIENDS MODULE]: Deleting friendship from {0}", url); HGFriendsServicesConnector friendConn = new HGFriendsServicesConnector(url); diff --git a/OpenSim/Region/CoreModules/Avatar/Friends/HGStatusNotifier.cs b/OpenSim/Region/CoreModules/Avatar/Friends/HGStatusNotifier.cs index 85f3252c13..88598abd12 100644 --- a/OpenSim/Region/CoreModules/Avatar/Friends/HGStatusNotifier.cs +++ b/OpenSim/Region/CoreModules/Avatar/Friends/HGStatusNotifier.cs @@ -44,8 +44,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Friends // ASSUMPTION: we assume that all users for one home domain // have exactly the same set of service URLs. // If this is ever not true, we need to change this. - UUID friendID = UUID.Zero; String tmp = String.Empty; - if (Util.ParseUniversalUserIdentifier(ids[0], out friendID, out tmp, out tmp, out tmp, out tmp)) + if (Util.ParseUniversalUserIdentifier(ids[0], out UUID friendID)) { string friendsServerURI = m_FriendsModule.UserManagementModule.GetUserServerURL(friendID, "FriendsServerURI"); if (friendsServerURI != string.Empty)