diff options
Diffstat (limited to '')
-rw-r--r-- | OpenSim.RegionServer/AgentAssetUpload.cs | 1 | ||||
-rw-r--r-- | OpenSim.RegionServer/Assets/InventoryCache.cs | 27 | ||||
-rw-r--r-- | OpenSim.RegionServer/CAPS/AdminWebFront.cs | 33 | ||||
-rw-r--r-- | OpenSim.RegionServer/Grid.cs | 1 | ||||
-rw-r--r-- | OpenSim.RegionServer/OpenSim.RegionServer.dll.build | 1 | ||||
-rw-r--r-- | OpenSim.RegionServer/OpenSimMain.cs | 22 | ||||
-rw-r--r-- | OpenSim.RegionServer/SimClient.cs | 48 | ||||
-rw-r--r-- | OpenSim.RegionServer/UserServer/LocalUserProfileManager.cs | 14 | ||||
-rw-r--r-- | OpenSim.RegionServer/UserServer/LoginServer.cs | 17 |
9 files changed, 139 insertions, 25 deletions
diff --git a/OpenSim.RegionServer/AgentAssetUpload.cs b/OpenSim.RegionServer/AgentAssetUpload.cs index 9f85598..d346647 100644 --- a/OpenSim.RegionServer/AgentAssetUpload.cs +++ b/OpenSim.RegionServer/AgentAssetUpload.cs | |||
@@ -201,6 +201,7 @@ namespace OpenSim | |||
201 | { | 201 | { |
202 | //already complete so we can add it to the inventory | 202 | //already complete so we can add it to the inventory |
203 | m_assetCache.AddAsset(trans.Asset); | 203 | m_assetCache.AddAsset(trans.Asset); |
204 | Console.WriteLine("creating inventory item"); | ||
204 | Console.WriteLine( "ITem created is " +m_inventoryCache.AddNewInventoryItem(this.ourClient, packet.InventoryBlock.FolderID, trans.Asset).ToStringHyphenated()); | 205 | Console.WriteLine( "ITem created is " +m_inventoryCache.AddNewInventoryItem(this.ourClient, packet.InventoryBlock.FolderID, trans.Asset).ToStringHyphenated()); |
205 | } | 206 | } |
206 | else | 207 | else |
diff --git a/OpenSim.RegionServer/Assets/InventoryCache.cs b/OpenSim.RegionServer/Assets/InventoryCache.cs index 3a4aa36..1090940 100644 --- a/OpenSim.RegionServer/Assets/InventoryCache.cs +++ b/OpenSim.RegionServer/Assets/InventoryCache.cs | |||
@@ -33,6 +33,7 @@ using libsecondlife.Packets; | |||
33 | //using OpenSim.GridServers; | 33 | //using OpenSim.GridServers; |
34 | using OpenSim.Framework.Inventory; | 34 | using OpenSim.Framework.Inventory; |
35 | using OpenSim.Framework.Assets; | 35 | using OpenSim.Framework.Assets; |
36 | using OpenSim.Framework.Interfaces; | ||
36 | 37 | ||
37 | namespace OpenSim.Assets | 38 | namespace OpenSim.Assets |
38 | { | 39 | { |
@@ -54,7 +55,21 @@ namespace OpenSim.Assets | |||
54 | 55 | ||
55 | public void AddNewAgentsInventory(AgentInventory agentInventory) | 56 | public void AddNewAgentsInventory(AgentInventory agentInventory) |
56 | { | 57 | { |
57 | this._agentsInventory.Add(agentInventory.AgentID, agentInventory); | 58 | if (!this._agentsInventory.ContainsKey(agentInventory.AgentID)) |
59 | { | ||
60 | this._agentsInventory.Add(agentInventory.AgentID, agentInventory); | ||
61 | } | ||
62 | } | ||
63 | |||
64 | public AgentInventory FetchAgentsInventory(LLUUID agentID, IUserServer userserver) | ||
65 | { | ||
66 | AgentInventory res = null; | ||
67 | if (!this._agentsInventory.ContainsKey(agentID)) | ||
68 | { | ||
69 | res = userserver.RequestAgentsInventory(agentID); | ||
70 | this._agentsInventory.Add(agentID,res); | ||
71 | } | ||
72 | return res; | ||
58 | } | 73 | } |
59 | 74 | ||
60 | public AgentInventory GetAgentsInventory(LLUUID agentID) | 75 | public AgentInventory GetAgentsInventory(LLUUID agentID) |
@@ -67,13 +82,16 @@ namespace OpenSim.Assets | |||
67 | return null; | 82 | return null; |
68 | } | 83 | } |
69 | 84 | ||
70 | public void ClientLeaving(LLUUID clientID) | 85 | public void ClientLeaving(LLUUID clientID, IUserServer userserver) |
71 | { | 86 | { |
72 | if (this._agentsInventory.ContainsKey(clientID)) | 87 | if (this._agentsInventory.ContainsKey(clientID)) |
73 | { | 88 | { |
89 | if (userserver != null) | ||
90 | { | ||
91 | userserver.UpdateAgentsInventory(clientID, this._agentsInventory[clientID]); | ||
92 | } | ||
74 | this._agentsInventory.Remove(clientID); | 93 | this._agentsInventory.Remove(clientID); |
75 | } | 94 | } |
76 | |||
77 | } | 95 | } |
78 | 96 | ||
79 | public bool CreateNewInventoryFolder(SimClient remoteClient, LLUUID folderID) | 97 | public bool CreateNewInventoryFolder(SimClient remoteClient, LLUUID folderID) |
@@ -171,6 +189,7 @@ namespace OpenSim.Assets | |||
171 | Descend.ItemData[i].Type = Item.Type; | 189 | Descend.ItemData[i].Type = Item.Type; |
172 | Descend.ItemData[i].CRC = libsecondlife.Helpers.InventoryCRC(1000, 0, Descend.ItemData[i].InvType, Descend.ItemData[i].Type, Descend.ItemData[i].AssetID, Descend.ItemData[i].GroupID, 100, Descend.ItemData[i].OwnerID, Descend.ItemData[i].CreatorID, Descend.ItemData[i].ItemID, Descend.ItemData[i].FolderID, FULL_MASK_PERMISSIONS, 1, FULL_MASK_PERMISSIONS, FULL_MASK_PERMISSIONS, FULL_MASK_PERMISSIONS); | 190 | Descend.ItemData[i].CRC = libsecondlife.Helpers.InventoryCRC(1000, 0, Descend.ItemData[i].InvType, Descend.ItemData[i].Type, Descend.ItemData[i].AssetID, Descend.ItemData[i].GroupID, 100, Descend.ItemData[i].OwnerID, Descend.ItemData[i].CreatorID, Descend.ItemData[i].ItemID, Descend.ItemData[i].FolderID, FULL_MASK_PERMISSIONS, 1, FULL_MASK_PERMISSIONS, FULL_MASK_PERMISSIONS, FULL_MASK_PERMISSIONS); |
173 | } | 191 | } |
192 | |||
174 | userInfo.OutPacket(Descend); | 193 | userInfo.OutPacket(Descend); |
175 | 194 | ||
176 | } | 195 | } |
diff --git a/OpenSim.RegionServer/CAPS/AdminWebFront.cs b/OpenSim.RegionServer/CAPS/AdminWebFront.cs index 03f8692..8224050 100644 --- a/OpenSim.RegionServer/CAPS/AdminWebFront.cs +++ b/OpenSim.RegionServer/CAPS/AdminWebFront.cs | |||
@@ -3,6 +3,7 @@ using System.Collections.Generic; | |||
3 | using System.Text; | 3 | using System.Text; |
4 | using System.IO; | 4 | using System.IO; |
5 | using OpenSim.world; | 5 | using OpenSim.world; |
6 | using OpenSim.UserServer; | ||
6 | 7 | ||
7 | namespace OpenSim.CAPS | 8 | namespace OpenSim.CAPS |
8 | { | 9 | { |
@@ -13,9 +14,11 @@ namespace OpenSim.CAPS | |||
13 | private string LoginForm; | 14 | private string LoginForm; |
14 | private string passWord = "Admin"; | 15 | private string passWord = "Admin"; |
15 | private World m_world; | 16 | private World m_world; |
17 | private LoginServer _userServer; | ||
16 | 18 | ||
17 | public AdminWebFront(string password, World world) | 19 | public AdminWebFront(string password, World world, LoginServer userserver) |
18 | { | 20 | { |
21 | _userServer = userserver; | ||
19 | m_world = world; | 22 | m_world = world; |
20 | passWord = password; | 23 | passWord = password; |
21 | LoadAdminPage(); | 24 | LoadAdminPage(); |
@@ -63,8 +66,12 @@ namespace OpenSim.CAPS | |||
63 | case "/Admin/NewAccount": | 66 | case "/Admin/NewAccount": |
64 | if (requestMethod == "POST") | 67 | if (requestMethod == "POST") |
65 | { | 68 | { |
66 | string[] comp = new string[10]; | 69 | string firstName = ""; |
67 | string[] passw = new string[3]; | 70 | string secondName = ""; |
71 | string userPasswd = ""; | ||
72 | string[] comp; | ||
73 | string[] passw; | ||
74 | string[] line; | ||
68 | string delimStr = "&"; | 75 | string delimStr = "&"; |
69 | char[] delimiter = delimStr.ToCharArray(); | 76 | char[] delimiter = delimStr.ToCharArray(); |
70 | string delimStr2 = "="; | 77 | string delimStr2 = "="; |
@@ -75,6 +82,26 @@ namespace OpenSim.CAPS | |||
75 | passw = comp[3].Split(delimiter2); | 82 | passw = comp[3].Split(delimiter2); |
76 | if (passw[1] == passWord) | 83 | if (passw[1] == passWord) |
77 | { | 84 | { |
85 | |||
86 | line = comp[0].Split(delimiter2); //split firstname | ||
87 | if (line.Length > 1) | ||
88 | { | ||
89 | firstName = line[1]; | ||
90 | } | ||
91 | line = comp[1].Split(delimiter2); //split secondname | ||
92 | if (line.Length > 1) | ||
93 | { | ||
94 | secondName = line[1]; | ||
95 | } | ||
96 | line = comp[2].Split(delimiter2); //split user password | ||
97 | if (line.Length > 1) | ||
98 | { | ||
99 | userPasswd = line[1]; | ||
100 | } | ||
101 | if (this._userServer != null) | ||
102 | { | ||
103 | this._userServer.CreateUserAccount(firstName, secondName, userPasswd); | ||
104 | } | ||
78 | responseString = "<p> New Account created </p>"; | 105 | responseString = "<p> New Account created </p>"; |
79 | } | 106 | } |
80 | else | 107 | else |
diff --git a/OpenSim.RegionServer/Grid.cs b/OpenSim.RegionServer/Grid.cs index b0df6a8..db5b8fe 100644 --- a/OpenSim.RegionServer/Grid.cs +++ b/OpenSim.RegionServer/Grid.cs | |||
@@ -11,6 +11,7 @@ namespace OpenSim | |||
11 | { | 11 | { |
12 | public IAssetServer AssetServer; | 12 | public IAssetServer AssetServer; |
13 | public IGridServer GridServer; | 13 | public IGridServer GridServer; |
14 | public IUserServer UserServer; | ||
14 | public string AssetDll = ""; | 15 | public string AssetDll = ""; |
15 | public string GridDll = ""; | 16 | public string GridDll = ""; |
16 | 17 | ||
diff --git a/OpenSim.RegionServer/OpenSim.RegionServer.dll.build b/OpenSim.RegionServer/OpenSim.RegionServer.dll.build index b67db54..ef7dce9 100644 --- a/OpenSim.RegionServer/OpenSim.RegionServer.dll.build +++ b/OpenSim.RegionServer/OpenSim.RegionServer.dll.build | |||
@@ -16,7 +16,6 @@ | |||
16 | <include name="Grid.cs" /> | 16 | <include name="Grid.cs" /> |
17 | <include name="OpenSimMain.cs" /> | 17 | <include name="OpenSimMain.cs" /> |
18 | <include name="OpenSimNetworkHandler.cs" /> | 18 | <include name="OpenSimNetworkHandler.cs" /> |
19 | <include name="OpenSimRoot.cs" /> | ||
20 | <include name="QueItem.cs" /> | 19 | <include name="QueItem.cs" /> |
21 | <include name="SimClient.cs" /> | 20 | <include name="SimClient.cs" /> |
22 | <include name="SimConsole.cs" /> | 21 | <include name="SimConsole.cs" /> |
diff --git a/OpenSim.RegionServer/OpenSimMain.cs b/OpenSim.RegionServer/OpenSimMain.cs index ed3e732..07a2d6d 100644 --- a/OpenSim.RegionServer/OpenSimMain.cs +++ b/OpenSim.RegionServer/OpenSimMain.cs | |||
@@ -75,6 +75,7 @@ namespace OpenSim | |||
75 | public string m_physicsEngine; | 75 | public string m_physicsEngine; |
76 | public bool m_sandbox = false; | 76 | public bool m_sandbox = false; |
77 | public bool m_loginserver; | 77 | public bool m_loginserver; |
78 | public bool user_accounts = false; | ||
78 | 79 | ||
79 | protected ConsoleBase m_console; | 80 | protected ConsoleBase m_console; |
80 | 81 | ||
@@ -145,12 +146,22 @@ namespace OpenSim | |||
145 | 146 | ||
146 | m_console.WriteLine("Main.cs:Startup() - Starting CAPS HTTP server"); | 147 | m_console.WriteLine("Main.cs:Startup() - Starting CAPS HTTP server"); |
147 | HttpServer = new SimCAPSHTTPServer(GridServers.GridServer, Cfg.IPListenPort); | 148 | HttpServer = new SimCAPSHTTPServer(GridServers.GridServer, Cfg.IPListenPort); |
148 | HttpServer.AddRestHandler("Admin", new AdminWebFront("Admin", LocalWorld)); | ||
149 | 149 | ||
150 | if ( m_loginserver && m_sandbox) | 150 | LoginServer loginServer = null; |
151 | if (m_loginserver && m_sandbox) | ||
151 | { | 152 | { |
152 | LoginServer loginServer = new LoginServer(GridServers.GridServer, Cfg.IPListenAddr, Cfg.IPListenPort); | 153 | loginServer = new LoginServer(GridServers.GridServer, Cfg.IPListenAddr, Cfg.IPListenPort, this.user_accounts); |
153 | loginServer.Startup(); | 154 | loginServer.Startup(); |
155 | |||
156 | } | ||
157 | if((m_loginserver) && (m_sandbox) && (user_accounts)) | ||
158 | { | ||
159 | this.GridServers.UserServer = loginServer; | ||
160 | HttpServer.AddRestHandler("Admin", new AdminWebFront("Admin", LocalWorld, loginServer)); | ||
161 | } | ||
162 | else | ||
163 | { | ||
164 | HttpServer.AddRestHandler("Admin", new AdminWebFront("Admin", LocalWorld, null)); | ||
154 | } | 165 | } |
155 | 166 | ||
156 | MainServerListener(); | 167 | MainServerListener(); |
@@ -210,6 +221,11 @@ namespace OpenSim | |||
210 | UseCircuitCodePacket useCircuit = (UseCircuitCodePacket)packet; | 221 | UseCircuitCodePacket useCircuit = (UseCircuitCodePacket)packet; |
211 | this.clientCircuits.Add(epSender, useCircuit.CircuitCode.Code); | 222 | this.clientCircuits.Add(epSender, useCircuit.CircuitCode.Code); |
212 | SimClient newuser = new SimClient(epSender, useCircuit, LocalWorld, ClientThreads, AssetCache, GridServers.GridServer, this, InventoryCache, m_sandbox); | 223 | SimClient newuser = new SimClient(epSender, useCircuit, LocalWorld, ClientThreads, AssetCache, GridServers.GridServer, this, InventoryCache, m_sandbox); |
224 | if ((this.GridServers.UserServer != null) && (user_accounts)) | ||
225 | { | ||
226 | Console.WriteLine("setting userserver"); | ||
227 | newuser.UserServer = this.GridServers.UserServer; | ||
228 | } | ||
213 | //OpenSimRoot.Instance.ClientThreads.Add(epSender, newuser); | 229 | //OpenSimRoot.Instance.ClientThreads.Add(epSender, newuser); |
214 | ClientThreads.Add(useCircuit.CircuitCode.Code, newuser); | 230 | ClientThreads.Add(useCircuit.CircuitCode.Code, newuser); |
215 | } | 231 | } |
diff --git a/OpenSim.RegionServer/SimClient.cs b/OpenSim.RegionServer/SimClient.cs index e013b63..6eb48fb 100644 --- a/OpenSim.RegionServer/SimClient.cs +++ b/OpenSim.RegionServer/SimClient.cs | |||
@@ -75,10 +75,20 @@ namespace OpenSim | |||
75 | private Dictionary<uint, SimClient> m_clientThreads; | 75 | private Dictionary<uint, SimClient> m_clientThreads; |
76 | private AssetCache m_assetCache; | 76 | private AssetCache m_assetCache; |
77 | private IGridServer m_gridServer; | 77 | private IGridServer m_gridServer; |
78 | private IUserServer m_userServer = null; | ||
78 | private OpenSimNetworkHandler m_application; | 79 | private OpenSimNetworkHandler m_application; |
79 | private InventoryCache m_inventoryCache; | 80 | private InventoryCache m_inventoryCache; |
80 | private bool m_sandboxMode; | 81 | private bool m_sandboxMode; |
81 | 82 | ||
83 | |||
84 | public IUserServer UserServer | ||
85 | { | ||
86 | set | ||
87 | { | ||
88 | this.m_userServer = value; | ||
89 | } | ||
90 | } | ||
91 | |||
82 | private void ack_pack(Packet Pack) | 92 | private void ack_pack(Packet Pack) |
83 | { | 93 | { |
84 | //libsecondlife.Packets.PacketAckPacket ack_it = new PacketAckPacket(); | 94 | //libsecondlife.Packets.PacketAckPacket ack_it = new PacketAckPacket(); |
@@ -241,6 +251,15 @@ namespace OpenSim | |||
241 | { | 251 | { |
242 | client.OutPacket(kill); | 252 | client.OutPacket(kill); |
243 | } | 253 | } |
254 | if (this.m_userServer != null) | ||
255 | { | ||
256 | this.m_inventoryCache.ClientLeaving(this.AgentID, this.m_userServer); | ||
257 | } | ||
258 | else | ||
259 | { | ||
260 | this.m_inventoryCache.ClientLeaving(this.AgentID, null); | ||
261 | } | ||
262 | |||
244 | m_gridServer.LogoutSession(this.SessionID, this.AgentID, this.CircuitCode); | 263 | m_gridServer.LogoutSession(this.SessionID, this.AgentID, this.CircuitCode); |
245 | lock (m_world.Entities) | 264 | lock (m_world.Entities) |
246 | { | 265 | { |
@@ -657,12 +676,16 @@ namespace OpenSim | |||
657 | // Create Inventory, currently only works for sandbox mode | 676 | // Create Inventory, currently only works for sandbox mode |
658 | if (m_sandboxMode) | 677 | if (m_sandboxMode) |
659 | { | 678 | { |
679 | AgentInventory inventory = null; | ||
660 | if (sessionInfo.LoginInfo.InventoryFolder != null) | 680 | if (sessionInfo.LoginInfo.InventoryFolder != null) |
661 | { | 681 | { |
662 | this.CreateInventory(sessionInfo.LoginInfo.InventoryFolder); | 682 | inventory = this.CreateInventory(sessionInfo.LoginInfo.InventoryFolder); |
663 | if (sessionInfo.LoginInfo.BaseFolder != null) | 683 | if (sessionInfo.LoginInfo.BaseFolder != null) |
664 | { | 684 | { |
665 | m_inventoryCache.CreateNewInventoryFolder(this, sessionInfo.LoginInfo.BaseFolder); | 685 | if (!inventory.HasFolder(sessionInfo.LoginInfo.BaseFolder)) |
686 | { | ||
687 | m_inventoryCache.CreateNewInventoryFolder(this, sessionInfo.LoginInfo.BaseFolder); | ||
688 | } | ||
666 | this.newAssetFolder = sessionInfo.LoginInfo.BaseFolder; | 689 | this.newAssetFolder = sessionInfo.LoginInfo.BaseFolder; |
667 | AssetBase[] inventorySet = m_assetCache.CreateNewInventorySet(this.AgentID); | 690 | AssetBase[] inventorySet = m_assetCache.CreateNewInventorySet(this.AgentID); |
668 | if (inventorySet != null) | 691 | if (inventorySet != null) |
@@ -683,12 +706,23 @@ namespace OpenSim | |||
683 | } | 706 | } |
684 | } | 707 | } |
685 | 708 | ||
686 | private void CreateInventory(LLUUID baseFolder) | 709 | private AgentInventory CreateInventory(LLUUID baseFolder) |
687 | { | 710 | { |
688 | AgentInventory inventory = new AgentInventory(); | 711 | AgentInventory inventory = null; |
689 | inventory.AgentID = this.AgentID; | 712 | if (this.m_userServer != null) |
690 | m_inventoryCache.AddNewAgentsInventory(inventory); | 713 | { |
691 | m_inventoryCache.CreateNewInventoryFolder(this, baseFolder); | 714 | // a user server is set so request the inventory from it |
715 | inventory = m_inventoryCache.FetchAgentsInventory(this.AgentID, m_userServer); | ||
716 | } | ||
717 | else | ||
718 | { | ||
719 | inventory = new AgentInventory(); | ||
720 | inventory.AgentID = this.AgentID; | ||
721 | inventory.CreateRootFolder(this.AgentID, false); | ||
722 | m_inventoryCache.AddNewAgentsInventory(inventory); | ||
723 | m_inventoryCache.CreateNewInventoryFolder(this, baseFolder); | ||
724 | } | ||
725 | return inventory; | ||
692 | } | 726 | } |
693 | } | 727 | } |
694 | } | 728 | } |
diff --git a/OpenSim.RegionServer/UserServer/LocalUserProfileManager.cs b/OpenSim.RegionServer/UserServer/LocalUserProfileManager.cs index eee1c3a..b31feda 100644 --- a/OpenSim.RegionServer/UserServer/LocalUserProfileManager.cs +++ b/OpenSim.RegionServer/UserServer/LocalUserProfileManager.cs | |||
@@ -30,8 +30,8 @@ namespace OpenSim.UserServer | |||
30 | 30 | ||
31 | public override void CustomiseResponse(ref System.Collections.Hashtable response, UserProfile theUser) | 31 | public override void CustomiseResponse(ref System.Collections.Hashtable response, UserProfile theUser) |
32 | { | 32 | { |
33 | uint circode = (uint)response["circuit_code"]; | 33 | Int32 circode = (Int32)response["circuit_code"]; |
34 | theUser.AddSimCircuit(circode, LLUUID.Random()); | 34 | theUser.AddSimCircuit((uint)circode, LLUUID.Random()); |
35 | response["home"] = "{'region_handle':[r" + (997 * 256).ToString() + ",r" + (996 * 256).ToString() + "], 'position':[r" + theUser.homepos.X.ToString() + ",r" + theUser.homepos.Y.ToString() + ",r" + theUser.homepos.Z.ToString() + "], 'look_at':[r" + theUser.homelookat.X.ToString() + ",r" + theUser.homelookat.Y.ToString() + ",r" + theUser.homelookat.Z.ToString() + "]}"; | 35 | response["home"] = "{'region_handle':[r" + (997 * 256).ToString() + ",r" + (996 * 256).ToString() + "], 'position':[r" + theUser.homepos.X.ToString() + ",r" + theUser.homepos.Y.ToString() + ",r" + theUser.homepos.Z.ToString() + "], 'look_at':[r" + theUser.homelookat.X.ToString() + ",r" + theUser.homelookat.Y.ToString() + ",r" + theUser.homelookat.Z.ToString() + "]}"; |
36 | response["sim_port"] = m_port; | 36 | response["sim_port"] = m_port; |
37 | response["sim_ip"] = m_ipAddr; | 37 | response["sim_ip"] = m_ipAddr; |
@@ -40,18 +40,18 @@ namespace OpenSim.UserServer | |||
40 | 40 | ||
41 | string first; | 41 | string first; |
42 | string last; | 42 | string last; |
43 | if (response.Contains("first")) | 43 | if (response.Contains("first_name")) |
44 | { | 44 | { |
45 | first = (string)response["first"]; | 45 | first = (string)response["first_name"]; |
46 | } | 46 | } |
47 | else | 47 | else |
48 | { | 48 | { |
49 | first = "test"; | 49 | first = "test"; |
50 | } | 50 | } |
51 | 51 | ||
52 | if (response.Contains("last")) | 52 | if (response.Contains("last_name")) |
53 | { | 53 | { |
54 | last = (string)response["last"]; | 54 | last = (string)response["last_name"]; |
55 | } | 55 | } |
56 | else | 56 | else |
57 | { | 57 | { |
@@ -67,12 +67,14 @@ namespace OpenSim.UserServer | |||
67 | _login.Last = last; | 67 | _login.Last = last; |
68 | _login.Agent = new LLUUID((string)response["agent_id"]) ; | 68 | _login.Agent = new LLUUID((string)response["agent_id"]) ; |
69 | _login.Session = new LLUUID((string)response["session_id"]); | 69 | _login.Session = new LLUUID((string)response["session_id"]); |
70 | _login.SecureSession = new LLUUID((string)response["secure_session_id"]); | ||
70 | _login.BaseFolder = null; | 71 | _login.BaseFolder = null; |
71 | _login.InventoryFolder = new LLUUID((string)Inventory1["folder_id"]); | 72 | _login.InventoryFolder = new LLUUID((string)Inventory1["folder_id"]); |
72 | 73 | ||
73 | //working on local computer if so lets add to the gridserver's list of sessions? | 74 | //working on local computer if so lets add to the gridserver's list of sessions? |
74 | if (m_gridServer.GetName() == "Local") | 75 | if (m_gridServer.GetName() == "Local") |
75 | { | 76 | { |
77 | Console.WriteLine("adding login data to gridserver"); | ||
76 | ((LocalGridBase)this.m_gridServer).AddNewSession(_login); | 78 | ((LocalGridBase)this.m_gridServer).AddNewSession(_login); |
77 | } | 79 | } |
78 | } | 80 | } |
diff --git a/OpenSim.RegionServer/UserServer/LoginServer.cs b/OpenSim.RegionServer/UserServer/LoginServer.cs index 0bbe0b0..7b4c1f0 100644 --- a/OpenSim.RegionServer/UserServer/LoginServer.cs +++ b/OpenSim.RegionServer/UserServer/LoginServer.cs | |||
@@ -66,11 +66,12 @@ namespace OpenSim.UserServer | |||
66 | private int m_simPort; | 66 | private int m_simPort; |
67 | private string m_simAddr; | 67 | private string m_simAddr; |
68 | 68 | ||
69 | public LoginServer(IGridServer gridServer, string simAddr, int simPort) | 69 | public LoginServer(IGridServer gridServer, string simAddr, int simPort , bool useAccounts) |
70 | { | 70 | { |
71 | m_gridServer = gridServer; | 71 | m_gridServer = gridServer; |
72 | m_simPort = simPort; | 72 | m_simPort = simPort; |
73 | m_simAddr = simAddr; | 73 | m_simAddr = simAddr; |
74 | this.userAccounts = useAccounts; | ||
74 | } | 75 | } |
75 | 76 | ||
76 | // InitializeLogin: initialize the login | 77 | // InitializeLogin: initialize the login |
@@ -395,6 +396,15 @@ namespace OpenSim.UserServer | |||
395 | return Regex.Replace(BitConverter.ToString(encodedBytes), "-", "").ToLower(); | 396 | return Regex.Replace(BitConverter.ToString(encodedBytes), "-", "").ToLower(); |
396 | } | 397 | } |
397 | 398 | ||
399 | public bool CreateUserAccount(string firstName, string lastName, string password) | ||
400 | { | ||
401 | Console.WriteLine("creating new user account"); | ||
402 | string mdPassword = EncodePassword(password); | ||
403 | Console.WriteLine("with password: " + mdPassword); | ||
404 | this.userManager.CreateNewProfile(firstName, lastName, mdPassword); | ||
405 | return true; | ||
406 | } | ||
407 | |||
398 | //IUserServer implementation | 408 | //IUserServer implementation |
399 | public AgentInventory RequestAgentsInventory(LLUUID agentID) | 409 | public AgentInventory RequestAgentsInventory(LLUUID agentID) |
400 | { | 410 | { |
@@ -407,6 +417,11 @@ namespace OpenSim.UserServer | |||
407 | return aInventory; | 417 | return aInventory; |
408 | } | 418 | } |
409 | 419 | ||
420 | public bool UpdateAgentsInventory(LLUUID agentID, AgentInventory inventory) | ||
421 | { | ||
422 | return true; | ||
423 | } | ||
424 | |||
410 | public void SetServerInfo(string ServerUrl, string SendKey, string RecvKey) | 425 | public void SetServerInfo(string ServerUrl, string SendKey, string RecvKey) |
411 | { | 426 | { |
412 | 427 | ||