aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim.Framework/UserProfileManager.cs
diff options
context:
space:
mode:
authorMW2007-03-28 18:10:52 +0000
committerMW2007-03-28 18:10:52 +0000
commit35fa85069e792579ebd44a974053d6dce288ea0a (patch)
tree8a5629c4f5e0a51e20a05123c4b1b9ea9f49f61e /OpenSim.Framework/UserProfileManager.cs
parent* log file name conflict (diff)
downloadopensim-SC-35fa85069e792579ebd44a974053d6dce288ea0a.zip
opensim-SC-35fa85069e792579ebd44a974053d6dce288ea0a.tar.gz
opensim-SC-35fa85069e792579ebd44a974053d6dce288ea0a.tar.bz2
opensim-SC-35fa85069e792579ebd44a974053d6dce288ea0a.tar.xz
After hours of searching for a bug, it works - User accounts in sandbox mode, currently they are not persistent between restarts (ie restarting opensim.exe) but should be persistent between sessions (login/ logout).
Use the -account command line arg to enable them and then create new accounts through the web interface
Diffstat (limited to '')
-rw-r--r--OpenSim.Framework/UserProfileManager.cs12
1 files changed, 7 insertions, 5 deletions
diff --git a/OpenSim.Framework/UserProfileManager.cs b/OpenSim.Framework/UserProfileManager.cs
index f77ca4c..d6304d0 100644
--- a/OpenSim.Framework/UserProfileManager.cs
+++ b/OpenSim.Framework/UserProfileManager.cs
@@ -68,6 +68,7 @@ namespace OpenSim.Framework.User
68 68
69 UserProfile TheUser = GetProfileByName(firstname, lastname); 69 UserProfile TheUser = GetProfileByName(firstname, lastname);
70 70
71 /*
71 if (!((TheUser.CurrentSessionID == null) && (TheUser.CurrentSecureSessionID == null))) 72 if (!((TheUser.CurrentSessionID == null) && (TheUser.CurrentSecureSessionID == null)))
72 { 73 {
73 XmlRpcResponse PresenceErrorResp = new XmlRpcResponse(); 74 XmlRpcResponse PresenceErrorResp = new XmlRpcResponse();
@@ -78,7 +79,7 @@ namespace OpenSim.Framework.User
78 PresenceErrorResp.Value = PresenceErrorRespData; 79 PresenceErrorResp.Value = PresenceErrorRespData;
79 return (Regex.Replace(XmlRpcResponseSerializer.Singleton.Serialize(PresenceErrorResp), " encoding=\"utf-16\"", "")); 80 return (Regex.Replace(XmlRpcResponseSerializer.Singleton.Serialize(PresenceErrorResp), " encoding=\"utf-16\"", ""));
80 81
81 } 82 }*/
82 83
83 try 84 try
84 { 85 {
@@ -116,6 +117,7 @@ namespace OpenSim.Framework.User
116 ArrayList ClassifiedCategories = new ArrayList(); 117 ArrayList ClassifiedCategories = new ArrayList();
117 ClassifiedCategories.Add(ClassifiedCategoriesHash); 118 ClassifiedCategories.Add(ClassifiedCategoriesHash);
118 119
120 Console.WriteLine("copying inventory data to response");
119 ArrayList AgentInventory = new ArrayList(); 121 ArrayList AgentInventory = new ArrayList();
120 foreach (InventoryFolder InvFolder in TheUser.Inventory.InventoryFolders.Values) 122 foreach (InventoryFolder InvFolder in TheUser.Inventory.InventoryFolders.Values)
121 { 123 {
@@ -142,7 +144,7 @@ namespace OpenSim.Framework.User
142 uint circode = (uint)(Util.RandomClass.Next()); 144 uint circode = (uint)(Util.RandomClass.Next());
143 //TheUser.AddSimCircuit(circode, SimInfo.UUID); 145 //TheUser.AddSimCircuit(circode, SimInfo.UUID);
144 146
145 LoginGoodData["last_name"] = "\"" + TheUser.firstname + "\""; 147 LoginGoodData["last_name"] = "\"" + TheUser.lastname + "\"";
146 LoginGoodData["ui-config"] = ui_config; 148 LoginGoodData["ui-config"] = ui_config;
147 LoginGoodData["sim_ip"] = "127.0.0.1"; //SimInfo.sim_ip.ToString(); 149 LoginGoodData["sim_ip"] = "127.0.0.1"; //SimInfo.sim_ip.ToString();
148 LoginGoodData["login-flags"] = LoginFlags; 150 LoginGoodData["login-flags"] = LoginFlags;
@@ -160,7 +162,7 @@ namespace OpenSim.Framework.User
160 LoginGoodData["start_location"] = "last"; 162 LoginGoodData["start_location"] = "last";
161 LoginGoodData["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() + "]}"; 163 LoginGoodData["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() + "]}";
162 LoginGoodData["message"] = DefaultStartupMsg; 164 LoginGoodData["message"] = DefaultStartupMsg;
163 LoginGoodData["first_name"] = "\"" + firstname + "\""; 165 LoginGoodData["first_name"] = "\"" + TheUser.firstname + "\"";
164 LoginGoodData["circuit_code"] = (Int32)circode; 166 LoginGoodData["circuit_code"] = (Int32)circode;
165 LoginGoodData["sim_port"] = 9000; //(Int32)SimInfo.sim_port; 167 LoginGoodData["sim_port"] = 9000; //(Int32)SimInfo.sim_port;
166 LoginGoodData["secure_session_id"] = TheUser.CurrentSecureSessionID.ToStringHyphenated(); 168 LoginGoodData["secure_session_id"] = TheUser.CurrentSecureSessionID.ToStringHyphenated();
@@ -196,8 +198,8 @@ namespace OpenSim.Framework.User
196 SimProfile SimInfo = new SimProfile(); 198 SimProfile SimInfo = new SimProfile();
197 //get siminfo from grid server 199 //get siminfo from grid server
198 SimInfo = SimInfo.LoadFromGrid(theUser.homeregionhandle, GridURL, GridSendKey, GridRecvKey); 200 SimInfo = SimInfo.LoadFromGrid(theUser.homeregionhandle, GridURL, GridSendKey, GridRecvKey);
199 uint circode = (uint)response["circuit_code"]; 201 Int32 circode = (Int32)response["circuit_code"];
200 theUser.AddSimCircuit(circode, SimInfo.UUID); 202 theUser.AddSimCircuit((uint)circode, SimInfo.UUID);
201 response["home"] = "{'region_handle':[r" + (SimInfo.RegionLocX * 256).ToString() + ",r" + (SimInfo.RegionLocY * 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() + "]}"; 203 response["home"] = "{'region_handle':[r" + (SimInfo.RegionLocX * 256).ToString() + ",r" + (SimInfo.RegionLocY * 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() + "]}";
202 response["sim_ip"] = SimInfo.sim_ip.ToString(); 204 response["sim_ip"] = SimInfo.sim_ip.ToString();
203 response["sim_port"] = (Int32)SimInfo.sim_port; 205 response["sim_port"] = (Int32)SimInfo.sim_port;