diff options
-rw-r--r-- | OpenSim/Services/UserAccountService/UserAccountService.cs | 17 |
1 files changed, 14 insertions, 3 deletions
diff --git a/OpenSim/Services/UserAccountService/UserAccountService.cs b/OpenSim/Services/UserAccountService/UserAccountService.cs index 5561287..95c9e57 100644 --- a/OpenSim/Services/UserAccountService/UserAccountService.cs +++ b/OpenSim/Services/UserAccountService/UserAccountService.cs | |||
@@ -407,7 +407,7 @@ namespace OpenSim.Services.UserAccountService | |||
407 | else email = cmdparams[5]; | 407 | else email = cmdparams[5]; |
408 | 408 | ||
409 | if (cmdparams.Length < 7) | 409 | if (cmdparams.Length < 7) |
410 | rawPrincipalId = MainConsole.Instance.CmdPrompt("User ID", UUID.Random().ToString()); | 410 | rawPrincipalId = MainConsole.Instance.CmdPrompt("User ID (enter for random)", ""); |
411 | else | 411 | else |
412 | rawPrincipalId = cmdparams[6]; | 412 | rawPrincipalId = cmdparams[6]; |
413 | 413 | ||
@@ -417,7 +417,9 @@ namespace OpenSim.Services.UserAccountService | |||
417 | model = cmdparams[7]; | 417 | model = cmdparams[7]; |
418 | 418 | ||
419 | UUID principalId = UUID.Zero; | 419 | UUID principalId = UUID.Zero; |
420 | if (!UUID.TryParse(rawPrincipalId, out principalId)) | 420 | if(String.IsNullOrWhiteSpace(rawPrincipalId)) |
421 | principalId = UUID.Random(); | ||
422 | else if (!UUID.TryParse(rawPrincipalId, out principalId)) | ||
421 | throw new Exception(string.Format("ID {0} is not a valid UUID", rawPrincipalId)); | 423 | throw new Exception(string.Format("ID {0} is not a valid UUID", rawPrincipalId)); |
422 | 424 | ||
423 | CreateUser(UUID.Zero, principalId, firstName, lastName, password, email, model); | 425 | CreateUser(UUID.Zero, principalId, firstName, lastName, password, email, model); |
@@ -823,6 +825,7 @@ namespace OpenSim.Services.UserAccountService | |||
823 | return; | 825 | return; |
824 | } | 826 | } |
825 | 827 | ||
828 | |||
826 | try | 829 | try |
827 | { | 830 | { |
828 | CopyWearablesAndAttachments(destinationAgent, modelAccount.PrincipalID, modelAppearance); | 831 | CopyWearablesAndAttachments(destinationAgent, modelAccount.PrincipalID, modelAppearance); |
@@ -876,12 +879,20 @@ namespace OpenSim.Services.UserAccountService | |||
876 | for (int i = 0; i < wearables.Length; i++) | 879 | for (int i = 0; i < wearables.Length; i++) |
877 | { | 880 | { |
878 | wearable = wearables[i]; | 881 | wearable = wearables[i]; |
879 | m_log.DebugFormat("[XXX]: Getting item {0} from avie {1}", wearable[0].ItemID, source); | ||
880 | if (wearable[0].ItemID != UUID.Zero) | 882 | if (wearable[0].ItemID != UUID.Zero) |
881 | { | 883 | { |
884 | m_log.DebugFormat("[XXX]: Getting item {0} from avie {1}", wearable[0].ItemID, source); | ||
882 | // Get inventory item and copy it | 885 | // Get inventory item and copy it |
883 | InventoryItemBase item = m_InventoryService.GetItem(source, wearable[0].ItemID); | 886 | InventoryItemBase item = m_InventoryService.GetItem(source, wearable[0].ItemID); |
884 | 887 | ||
888 | if(item != null && item.AssetType == (int)AssetType.Link) | ||
889 | { | ||
890 | if(item.AssetID == UUID.Zero ) | ||
891 | item = null; | ||
892 | else | ||
893 | item = m_InventoryService.GetItem(source, item.AssetID); | ||
894 | } | ||
895 | |||
885 | if (item != null) | 896 | if (item != null) |
886 | { | 897 | { |
887 | InventoryItemBase destinationItem = new InventoryItemBase(UUID.Random(), destination); | 898 | InventoryItemBase destinationItem = new InventoryItemBase(UUID.Random(), destination); |