a few changes on universal id
This commit is contained in:
@@ -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))
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user