On login, if a set of inventory folders doesn't exist for the user then a new set is created in the inventory database. Most likely still better to use some other script to populate the inventory database instead of relaying on this.

afrisby
MW 2007-12-01 19:57:23 +00:00
parent 5df851761a
commit 6c9e588acb
2 changed files with 10 additions and 1 deletions

View File

@ -63,6 +63,7 @@ namespace OpenSim.Grid.InventoryServer
public bool CreateUsersInventory(LLUUID user)
{
Console.WriteLine("Creating New Set of Inventory Folders for " + user.ToStringHyphenated());
CreateNewUserInventory(user);
return true;
}

View File

@ -30,6 +30,7 @@ using System;
using System.Collections;
using System.Collections.Generic;
using System.Net;
using System.Threading;
using Nwc.XmlRpc;
using libsecondlife;
using OpenSim.Framework;
@ -197,6 +198,13 @@ namespace OpenSim.Grid.UserServer
protected override InventoryData CreateInventoryData(LLUUID userID)
{
List<InventoryFolderBase> folders = SyncRestObjectPoster.BeginPostObject<LLUUID, List<InventoryFolderBase>>(m_config.InventoryUrl + "RootFolders/", userID);
if (folders ==null | folders.Count == 0)
{
RestObjectPoster.BeginPostObject<LLUUID>(m_config.InventoryUrl + "CreateInventory/", userID);
Thread.Sleep(1000);
folders = SyncRestObjectPoster.BeginPostObject<LLUUID, List<InventoryFolderBase>>(m_config.InventoryUrl + "RootFolders/", userID);
}
if(folders.Count >0)
{
LLUUID rootID = LLUUID.Zero;