aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Communications/Local
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region/Communications/Local')
-rw-r--r--OpenSim/Region/Communications/Local/CommunicationsLocal.cs2
-rw-r--r--OpenSim/Region/Communications/Local/LocalInventoryService.cs3
-rw-r--r--OpenSim/Region/Communications/Local/LocalLoginService.cs51
-rw-r--r--OpenSim/Region/Communications/Local/LocalUserServices.cs5
4 files changed, 8 insertions, 53 deletions
diff --git a/OpenSim/Region/Communications/Local/CommunicationsLocal.cs b/OpenSim/Region/Communications/Local/CommunicationsLocal.cs
index a00b35f..7e08297 100644
--- a/OpenSim/Region/Communications/Local/CommunicationsLocal.cs
+++ b/OpenSim/Region/Communications/Local/CommunicationsLocal.cs
@@ -107,7 +107,7 @@ namespace OpenSim.Region.Communications.Local
107 } 107 }
108 else 108 else
109 { 109 {
110 this.m_inventoryService.CreateNewUserInventory(userProf.UUID); 110 this.m_inventoryService.CreateNewUserInventory(LLUUID.Zero, userProf.UUID);
111 Console.WriteLine("Created new inventory set for " + firstName + " " + lastName); 111 Console.WriteLine("Created new inventory set for " + firstName + " " + lastName);
112 return userProf.UUID; 112 return userProf.UUID;
113 } 113 }
diff --git a/OpenSim/Region/Communications/Local/LocalInventoryService.cs b/OpenSim/Region/Communications/Local/LocalInventoryService.cs
index 53f6ffa..5bd3277 100644
--- a/OpenSim/Region/Communications/Local/LocalInventoryService.cs
+++ b/OpenSim/Region/Communications/Local/LocalInventoryService.cs
@@ -3,6 +3,7 @@ using libsecondlife;
3using OpenSim.Framework.Communications; 3using OpenSim.Framework.Communications;
4using OpenSim.Framework.Data; 4using OpenSim.Framework.Data;
5using InventoryFolder=OpenSim.Framework.Communications.Caches.InventoryFolder; 5using InventoryFolder=OpenSim.Framework.Communications.Caches.InventoryFolder;
6using InventoryCategory = OpenSim.Framework.Data.InventoryCategory;
6 7
7namespace OpenSim.Region.Communications.Local 8namespace OpenSim.Region.Communications.Local
8{ 9{
@@ -49,7 +50,7 @@ namespace OpenSim.Region.Communications.Local
49 } 50 }
50 } 51 }
51 52
52 public override void AddNewInventoryFolder(LLUUID userID, InventoryFolder folder) 53 public override void AddNewInventoryFolder(LLUUID userID, InventoryFolderBase folder)
53 { 54 {
54 this.AddFolder(folder); 55 this.AddFolder(folder);
55 } 56 }
diff --git a/OpenSim/Region/Communications/Local/LocalLoginService.cs b/OpenSim/Region/Communications/Local/LocalLoginService.cs
index ab8e397..95fdf5a 100644
--- a/OpenSim/Region/Communications/Local/LocalLoginService.cs
+++ b/OpenSim/Region/Communications/Local/LocalLoginService.cs
@@ -7,7 +7,6 @@ using OpenSim.Framework.Data;
7using OpenSim.Framework.Types; 7using OpenSim.Framework.Types;
8using OpenSim.Framework.UserManagement; 8using OpenSim.Framework.UserManagement;
9using OpenSim.Framework.Utilities; 9using OpenSim.Framework.Utilities;
10using OpenSim.Framework.Inventory;
11 10
12namespace OpenSim.Region.Communications.Local 11namespace OpenSim.Region.Communications.Local
13{ 12{
@@ -25,7 +24,7 @@ namespace OpenSim.Region.Communications.Local
25 public event LoginToRegionEvent OnLoginToRegion; 24 public event LoginToRegionEvent OnLoginToRegion;
26 25
27 public LocalLoginService(UserManagerBase userManager, string welcomeMess, CommunicationsLocal parent, NetworkServersInfo serversInfo, bool authenticate) 26 public LocalLoginService(UserManagerBase userManager, string welcomeMess, CommunicationsLocal parent, NetworkServersInfo serversInfo, bool authenticate)
28 : base(userManager, welcomeMess) 27 : base(userManager, parent.InventoryService, welcomeMess)
29 { 28 {
30 m_Parent = parent; 29 m_Parent = parent;
31 this.serversInfo = serversInfo; 30 this.serversInfo = serversInfo;
@@ -53,7 +52,7 @@ namespace OpenSim.Region.Communications.Local
53 profile = this.m_userManager.GetUserProfile(firstname, lastname); 52 profile = this.m_userManager.GetUserProfile(firstname, lastname);
54 if (profile != null) 53 if (profile != null)
55 { 54 {
56 m_Parent.InventoryService.CreateNewUserInventory(profile.UUID); 55 m_Parent.InventoryService.CreateNewUserInventory(LLUUID.Zero, profile.UUID);
57 } 56 }
58 57
59 return profile; 58 return profile;
@@ -123,51 +122,5 @@ namespace OpenSim.Region.Communications.Local
123 } 122 }
124 123
125 } 124 }
126
127 protected override InventoryData CreateInventoryData(LLUUID userID)
128 {
129 List<InventoryFolderBase> folders = m_Parent.InventoryService.RequestFirstLevelFolders(userID);
130 if (folders.Count > 0)
131 {
132 LLUUID rootID = LLUUID.Zero;
133 ArrayList AgentInventoryArray = new ArrayList();
134 Hashtable TempHash;
135 foreach (InventoryFolderBase InvFolder in folders)
136 {
137 if (InvFolder.parentID == LLUUID.Zero)
138 {
139 rootID = InvFolder.folderID;
140 }
141 TempHash = new Hashtable();
142 TempHash["name"] = InvFolder.name;
143 TempHash["parent_id"] = InvFolder.parentID.ToStringHyphenated();
144 TempHash["version"] = (Int32)InvFolder.version;
145 TempHash["type_default"] = (Int32)InvFolder.type;
146 TempHash["folder_id"] = InvFolder.folderID.ToStringHyphenated();
147 AgentInventoryArray.Add(TempHash);
148 }
149 return new InventoryData(AgentInventoryArray, rootID);
150 }
151 else
152 {
153 AgentInventory userInventory = new AgentInventory();
154 userInventory.CreateRootFolder(userID, false);
155
156 ArrayList AgentInventoryArray = new ArrayList();
157 Hashtable TempHash;
158 foreach (OpenSim.Framework.Inventory.InventoryFolder InvFolder in userInventory.InventoryFolders.Values)
159 {
160 TempHash = new Hashtable();
161 TempHash["name"] = InvFolder.FolderName;
162 TempHash["parent_id"] = InvFolder.ParentID.ToStringHyphenated();
163 TempHash["version"] = (Int32)InvFolder.Version;
164 TempHash["type_default"] = (Int32)InvFolder.DefaultType;
165 TempHash["folder_id"] = InvFolder.FolderID.ToStringHyphenated();
166 AgentInventoryArray.Add(TempHash);
167 }
168
169 return new InventoryData(AgentInventoryArray, userInventory.InventoryRoot.FolderID);
170 }
171 }
172 } 125 }
173} 126}
diff --git a/OpenSim/Region/Communications/Local/LocalUserServices.cs b/OpenSim/Region/Communications/Local/LocalUserServices.cs
index 3bc4301..61b8633 100644
--- a/OpenSim/Region/Communications/Local/LocalUserServices.cs
+++ b/OpenSim/Region/Communications/Local/LocalUserServices.cs
@@ -1,4 +1,5 @@
1using System; 1using System;
2using libsecondlife;
2using OpenSim.Framework.Communications; 3using OpenSim.Framework.Communications;
3using OpenSim.Framework.Data; 4using OpenSim.Framework.Data;
4using OpenSim.Framework.Types; 5using OpenSim.Framework.Types;
@@ -48,10 +49,10 @@ namespace OpenSim.Region.Communications.Local
48 } 49 }
49 else 50 else
50 { 51 {
51 m_parent.InventoryService.CreateNewUserInventory(profile.UUID); 52 m_parent.InventoryService.CreateNewUserInventory(LLUUID.Zero, profile.UUID);
52 } 53 }
53 54
54 return profile; 55 return profile;
55 } 56 }
56 } 57 }
57} \ No newline at end of file 58}