aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim.Framework/UserProfileManager.cs
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim.Framework/UserProfileManager.cs')
-rw-r--r--OpenSim.Framework/UserProfileManager.cs21
1 files changed, 12 insertions, 9 deletions
diff --git a/OpenSim.Framework/UserProfileManager.cs b/OpenSim.Framework/UserProfileManager.cs
index 7c4fb6f..a44342c 100644
--- a/OpenSim.Framework/UserProfileManager.cs
+++ b/OpenSim.Framework/UserProfileManager.cs
@@ -106,7 +106,7 @@ namespace OpenSim.Framework.User
106 106
107 LLUUID AgentID = TheUser.UUID; 107 LLUUID AgentID = TheUser.UUID;
108 TheUser.InitSessionData(); 108 TheUser.InitSessionData();
109 109
110 //for loading data from a grid server, make any changes in CustomiseResponse() (or create a sub class of this and override that method) 110 //for loading data from a grid server, make any changes in CustomiseResponse() (or create a sub class of this and override that method)
111 //SimProfile SimInfo = new SimProfile(); 111 //SimProfile SimInfo = new SimProfile();
112 //SimInfo = SimInfo.LoadFromGrid(TheUser.homeregionhandle, GridURL, GridSendKey, GridRecvKey); 112 //SimInfo = SimInfo.LoadFromGrid(TheUser.homeregionhandle, GridURL, GridSendKey, GridRecvKey);
@@ -138,11 +138,12 @@ namespace OpenSim.Framework.User
138 ArrayList ClassifiedCategories = new ArrayList(); 138 ArrayList ClassifiedCategories = new ArrayList();
139 ClassifiedCategories.Add(ClassifiedCategoriesHash); 139 ClassifiedCategories.Add(ClassifiedCategoriesHash);
140 140
141 ArrayList AgentInventory = new ArrayList(); 141 ArrayList AgentInventory = new ArrayList();
142 Console.WriteLine("adding inventory to response"); 142 Console.WriteLine("adding inventory to response");
143 Hashtable TempHash;
143 foreach (InventoryFolder InvFolder in TheUser.Inventory.InventoryFolders.Values) 144 foreach (InventoryFolder InvFolder in TheUser.Inventory.InventoryFolders.Values)
144 { 145 {
145 Hashtable TempHash = new Hashtable(); 146 TempHash = new Hashtable();
146 Console.WriteLine("adding folder " + InvFolder.FolderName + ", ID: " + InvFolder.FolderID.ToStringHyphenated() + " with parent: " + InvFolder.ParentID.ToStringHyphenated()); 147 Console.WriteLine("adding folder " + InvFolder.FolderName + ", ID: " + InvFolder.FolderID.ToStringHyphenated() + " with parent: " + InvFolder.ParentID.ToStringHyphenated());
147 TempHash["name"] = InvFolder.FolderName; 148 TempHash["name"] = InvFolder.FolderName;
148 TempHash["parent_id"] = InvFolder.ParentID.ToStringHyphenated(); 149 TempHash["parent_id"] = InvFolder.ParentID.ToStringHyphenated();
@@ -192,14 +193,15 @@ namespace OpenSim.Framework.User
192 responseData["agent_id"] = AgentID.ToStringHyphenated(); 193 responseData["agent_id"] = AgentID.ToStringHyphenated();
193 responseData["region_y"] = (Int32)996 * 256; // (Int32)SimInfo.RegionLocY * 256; 194 responseData["region_y"] = (Int32)996 * 256; // (Int32)SimInfo.RegionLocY * 256;
194 responseData["region_x"] = (Int32)997 * 256; //SimInfo.RegionLocX * 256; 195 responseData["region_x"] = (Int32)997 * 256; //SimInfo.RegionLocX * 256;
195 responseData["seed_capability"] = null; 196 responseData["seed_capability"] = "";
196 responseData["agent_access"] = "M"; 197 responseData["agent_access"] = "M";
197 responseData["session_id"] = TheUser.CurrentSessionID.ToStringHyphenated(); 198 responseData["session_id"] = TheUser.CurrentSessionID.ToStringHyphenated();
198 responseData["login"] = "true"; 199 responseData["login"] = "true";
199 200
200 this.CustomiseResponse(ref responseData, TheUser); 201 this.CustomiseResponse(ref responseData, TheUser);
201 response.Value = responseData; 202 response.Value = responseData;
202 // TheUser.SendDataToSim(SimInfo); 203 // TheUser.SendDataToSim(SimInfo);
204 return response;
203 205
204 } 206 }
205 catch (Exception E) 207 catch (Exception E)
@@ -209,6 +211,7 @@ namespace OpenSim.Framework.User
209 //} 211 //}
210 } 212 }
211 return response; 213 return response;
214
212 } 215 }
213 216
214 private static XmlRpcResponse CreateErrorConnectingToGridResponse() 217 private static XmlRpcResponse CreateErrorConnectingToGridResponse()
@@ -236,13 +239,13 @@ namespace OpenSim.Framework.User
236 public virtual void CustomiseResponse(ref Hashtable response, UserProfile theUser) 239 public virtual void CustomiseResponse(ref Hashtable response, UserProfile theUser)
237 { 240 {
238 //default method set up to act as ogs user server 241 //default method set up to act as ogs user server
239 SimProfile SimInfo = new SimProfile(); 242 SimProfile SimInfo= new SimProfile();
240 //get siminfo from grid server 243 //get siminfo from grid server
241 SimInfo = SimInfo.LoadFromGrid(theUser.homeregionhandle, GridURL, GridSendKey, GridRecvKey); 244 SimInfo = SimInfo.LoadFromGrid(theUser.homeregionhandle, GridURL, GridSendKey, GridRecvKey);
242 Int32 circode = (Int32)response["circuit_code"]; 245 Int32 circode = (Int32)Convert.ToUInt32(response["circuit_code"]);
243 theUser.AddSimCircuit((uint)circode, SimInfo.UUID); 246 theUser.AddSimCircuit((uint)circode, SimInfo.UUID);
244 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() + "]}"; 247 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() + "]}";
245 response["sim_ip"] = SimInfo.sim_ip.ToString(); 248 response["sim_ip"] = SimInfo.sim_ip;
246 response["sim_port"] = (Int32)SimInfo.sim_port; 249 response["sim_port"] = (Int32)SimInfo.sim_port;
247 response["region_y"] = (Int32)SimInfo.RegionLocY * 256; 250 response["region_y"] = (Int32)SimInfo.RegionLocY * 256;
248 response["region_x"] = (Int32)SimInfo.RegionLocX * 256; 251 response["region_x"] = (Int32)SimInfo.RegionLocX * 256;
@@ -255,7 +258,7 @@ namespace OpenSim.Framework.User
255 SimParams["firstname"] = theUser.firstname; 258 SimParams["firstname"] = theUser.firstname;
256 SimParams["lastname"] = theUser.lastname; 259 SimParams["lastname"] = theUser.lastname;
257 SimParams["agent_id"] = theUser.UUID.ToString(); 260 SimParams["agent_id"] = theUser.UUID.ToString();
258 SimParams["circuit_code"] = (Int32)theUser.Circuits[SimInfo.UUID]; 261 SimParams["circuit_code"] = (Int32)circode;
259 ArrayList SendParams = new ArrayList(); 262 ArrayList SendParams = new ArrayList();
260 SendParams.Add(SimParams); 263 SendParams.Add(SimParams);
261 264