diff options
Diffstat (limited to 'Common/OpenSim.Servers/LoginResponse.cs')
-rw-r--r-- | Common/OpenSim.Servers/LoginResponse.cs | 58 |
1 files changed, 21 insertions, 37 deletions
diff --git a/Common/OpenSim.Servers/LoginResponse.cs b/Common/OpenSim.Servers/LoginResponse.cs index debfe43..dc4732c 100644 --- a/Common/OpenSim.Servers/LoginResponse.cs +++ b/Common/OpenSim.Servers/LoginResponse.cs | |||
@@ -72,7 +72,7 @@ namespace OpenSim.UserServer | |||
72 | private ArrayList initialOutfit; | 72 | private ArrayList initialOutfit; |
73 | private ArrayList agentInventory; | 73 | private ArrayList agentInventory; |
74 | 74 | ||
75 | private UserProfile userProfile; | 75 | private UserInfo userProfile; |
76 | 76 | ||
77 | private LLUUID agentID; | 77 | private LLUUID agentID; |
78 | private LLUUID sessionID; | 78 | private LLUUID sessionID; |
@@ -131,7 +131,7 @@ namespace OpenSim.UserServer | |||
131 | this.uiConfigHash = new Hashtable(); | 131 | this.uiConfigHash = new Hashtable(); |
132 | 132 | ||
133 | this.defaultXmlRpcResponse = new XmlRpcResponse(); | 133 | this.defaultXmlRpcResponse = new XmlRpcResponse(); |
134 | this.userProfile = new UserProfile(); | 134 | this.userProfile = new UserInfo(); |
135 | this.inventoryRoot = new ArrayList(); | 135 | this.inventoryRoot = new ArrayList(); |
136 | this.initialOutfit = new ArrayList(); | 136 | this.initialOutfit = new ArrayList(); |
137 | this.agentInventory = new ArrayList(); | 137 | this.agentInventory = new ArrayList(); |
@@ -181,28 +181,9 @@ namespace OpenSim.UserServer | |||
181 | this.AddClassifiedCategory((Int32)8, "Service"); | 181 | this.AddClassifiedCategory((Int32)8, "Service"); |
182 | this.AddClassifiedCategory((Int32)9, "Personal"); | 182 | this.AddClassifiedCategory((Int32)9, "Personal"); |
183 | 183 | ||
184 | int SessionRand = Util.RandomClass.Next(1, 999); | 184 | this.SessionID = LLUUID.Random(); |
185 | this.SessionID = new LLUUID("aaaabbbb-0200-" + SessionRand.ToString("0000") + "-8664-58f53e442797"); | ||
186 | this.SecureSessionID = LLUUID.Random(); | 185 | this.SecureSessionID = LLUUID.Random(); |
187 | 186 | this.AgentID = LLUUID.Random(); | |
188 | this.userProfile.Inventory.CreateRootFolder(this.userProfile.UUID, true); | ||
189 | this.baseFolderID = this.userProfile.Inventory.GetFolderID("Textures"); | ||
190 | this.inventoryFolderID = this.userProfile.Inventory.GetFolderID("My Inventory-"); | ||
191 | Hashtable InventoryRootHash = new Hashtable(); | ||
192 | InventoryRootHash["folder_id"] = this.userProfile.Inventory.InventoryRoot.FolderID.ToStringHyphenated(); | ||
193 | this.inventoryRoot.Add(InventoryRootHash); | ||
194 | |||
195 | Hashtable TempHash; | ||
196 | foreach (InventoryFolder InvFolder in this.userProfile.Inventory.InventoryFolders.Values) | ||
197 | { | ||
198 | TempHash = new Hashtable(); | ||
199 | TempHash["name"] = InvFolder.FolderName; | ||
200 | TempHash["parent_id"] = InvFolder.ParentID.ToStringHyphenated(); | ||
201 | TempHash["version"] = (Int32)InvFolder.Version; | ||
202 | TempHash["type_default"] = (Int32)InvFolder.DefaultType; | ||
203 | TempHash["folder_id"] = InvFolder.FolderID.ToStringHyphenated(); | ||
204 | this.agentInventory.Add(TempHash); | ||
205 | } | ||
206 | 187 | ||
207 | Hashtable InitialOutfitHash = new Hashtable(); | 188 | Hashtable InitialOutfitHash = new Hashtable(); |
208 | InitialOutfitHash["folder_name"] = "Nightclub Female"; | 189 | InitialOutfitHash["folder_name"] = "Nightclub Female"; |
@@ -219,15 +200,6 @@ namespace OpenSim.UserServer | |||
219 | 200 | ||
220 | } // SetDefaultValues | 201 | } // SetDefaultValues |
221 | 202 | ||
222 | protected virtual LLUUID GetAgentId() | ||
223 | { | ||
224 | // todo | ||
225 | LLUUID Agent; | ||
226 | int AgentRand = Util.RandomClass.Next(1, 9999); | ||
227 | Agent = new LLUUID("99998888-0100-" + AgentRand.ToString("0000") + "-8ec1-0b1d5cd6aead"); | ||
228 | return Agent; | ||
229 | } // GetAgentId | ||
230 | |||
231 | private XmlRpcResponse GenerateFailureResponse(string reason, string message, string login) | 203 | private XmlRpcResponse GenerateFailureResponse(string reason, string message, string login) |
232 | { | 204 | { |
233 | // Overwrite any default values; | 205 | // Overwrite any default values; |
@@ -287,9 +259,6 @@ namespace OpenSim.UserServer | |||
287 | this.AddToUIConfig("allow_first_life", this.allowFirstLife); | 259 | this.AddToUIConfig("allow_first_life", this.allowFirstLife); |
288 | this.uiConfig.Add(this.uiConfigHash); | 260 | this.uiConfig.Add(this.uiConfigHash); |
289 | 261 | ||
290 | // Create a agent and session LLUUID | ||
291 | this.agentID = this.GetAgentId(); | ||
292 | |||
293 | responseData["sim_port"] = this.SimPort; | 262 | responseData["sim_port"] = this.SimPort; |
294 | responseData["sim_ip"] = this.SimAddress; | 263 | responseData["sim_ip"] = this.SimAddress; |
295 | responseData["agent_id"] = this.AgentID.ToStringHyphenated(); | 264 | responseData["agent_id"] = this.AgentID.ToStringHyphenated(); |
@@ -320,6 +289,9 @@ namespace OpenSim.UserServer | |||
320 | responseData["region_x"] = (Int32)this.RegionX * 256; | 289 | responseData["region_x"] = (Int32)this.RegionX * 256; |
321 | responseData["region_y"] = (Int32)this.RegionY * 256; | 290 | responseData["region_y"] = (Int32)this.RegionY * 256; |
322 | 291 | ||
292 | //responseData["inventory-lib-root"] = new ArrayList(); // todo | ||
293 | //responseData["buddy-list"] = new ArrayList(); // todo | ||
294 | |||
323 | responseData["login"] = "true"; | 295 | responseData["login"] = "true"; |
324 | this.xmlRpcResponse.Value = responseData; | 296 | this.xmlRpcResponse.Value = responseData; |
325 | 297 | ||
@@ -355,6 +327,7 @@ namespace OpenSim.UserServer | |||
355 | // this.classifiedCategoriesHash.Clear(); | 327 | // this.classifiedCategoriesHash.Clear(); |
356 | } // SetClassifiedCategory | 328 | } // SetClassifiedCategory |
357 | 329 | ||
330 | #region Properties | ||
358 | public string Login | 331 | public string Login |
359 | { | 332 | { |
360 | get | 333 | get |
@@ -667,5 +640,16 @@ namespace OpenSim.UserServer | |||
667 | } | 640 | } |
668 | } // ErrorMessage | 641 | } // ErrorMessage |
669 | 642 | ||
670 | } // LoginResponse | 643 | #endregion |
671 | } // namespace OpenSim.UserServer \ No newline at end of file | 644 | |
645 | |||
646 | public class UserInfo | ||
647 | { | ||
648 | public string firstname; | ||
649 | public string lastname; | ||
650 | public ulong homeregionhandle; | ||
651 | public LLVector3 homepos; | ||
652 | public LLVector3 homelookat; | ||
653 | } | ||
654 | } | ||
655 | } \ No newline at end of file | ||