Updated to use LoginResponse.

zircon^2
andy 2007-05-11 19:33:52 +00:00
parent 3e5d954057
commit 488f7763ba
1 changed files with 27 additions and 27 deletions

View File

@ -113,10 +113,10 @@ namespace OpenSim.UserServer
string first; string first;
string last; string last;
string passwd; string passwd;
LLUUID Agent;
LLUUID Session;
LoginResponse loginResponse = new LoginResponse(regionX, regionY); LoginResponse loginResponse = new LoginResponse();
loginResponse.RegionX = regionX;
loginResponse.RegionY = regionY;
//get login name //get login name
if (requestData.Contains("first")) if (requestData.Contains("first"))
@ -154,34 +154,34 @@ namespace OpenSim.UserServer
NumClients++; NumClients++;
// Create a agent and session LLUUID // Create a agent and session LLUUID
Agent = GetAgentId(first, last); // Agent = GetAgentId(first, last);
int SessionRand = Util.RandomClass.Next(1, 999); // int SessionRand = Util.RandomClass.Next(1, 999);
Session = new LLUUID("aaaabbbb-0200-" + SessionRand.ToString("0000") + "-8664-58f53e442797"); // Session = new LLUUID("aaaabbbb-0200-" + SessionRand.ToString("0000") + "-8664-58f53e442797");
LLUUID secureSess = LLUUID.Random(); // LLUUID secureSess = LLUUID.Random();
loginResponse.SimPort = m_simPort.ToString(); loginResponse.SimPort = m_simPort.ToString();
loginResponse.SimAddress = m_simAddr.ToString(); loginResponse.SimAddress = m_simAddr.ToString();
loginResponse.AgentID = Agent.ToStringHyphenated(); // loginResponse.AgentID = Agent.ToStringHyphenated();
loginResponse.SessionID = Session.ToStringHyphenated(); // loginResponse.SessionID = Session.ToStringHyphenated();
loginResponse.SecureSessionID = secureSess.ToStringHyphenated(); // loginResponse.SecureSessionID = secureSess.ToStringHyphenated();
loginResponse.CircuitCode = (Int32)(Util.RandomClass.Next()); loginResponse.CircuitCode = (Int32)(Util.RandomClass.Next());
XmlRpcResponse response = loginResponse.ToXmlRpcResponse(); XmlRpcResponse response = loginResponse.ToXmlRpcResponse();
Hashtable responseData = (Hashtable)response.Value; Hashtable responseData = (Hashtable)response.Value;
// inventory // inventory
ArrayList InventoryList = (ArrayList)responseData["inventory-skeleton"]; // ArrayList InventoryList = (ArrayList)responseData["inventory-skeleton"];
Hashtable Inventory1 = (Hashtable)InventoryList[0]; // Hashtable Inventory1 = (Hashtable)InventoryList[0];
Hashtable Inventory2 = (Hashtable)InventoryList[1]; // Hashtable Inventory2 = (Hashtable)InventoryList[1];
LLUUID BaseFolderID = LLUUID.Random(); // LLUUID BaseFolderID = LLUUID.Random();
LLUUID InventoryFolderID = LLUUID.Random(); // LLUUID InventoryFolderID = LLUUID.Random();
Inventory2["name"] = "Textures"; // Inventory2["name"] = "Textures";
Inventory2["folder_id"] = BaseFolderID.ToStringHyphenated(); // Inventory2["folder_id"] = BaseFolderID.ToStringHyphenated();
Inventory2["type_default"] = 0; // Inventory2["type_default"] = 0;
Inventory1["folder_id"] = InventoryFolderID.ToStringHyphenated(); // Inventory1["folder_id"] = InventoryFolderID.ToStringHyphenated();
ArrayList InventoryRoot = (ArrayList)responseData["inventory-root"]; // ArrayList InventoryRoot = (ArrayList)responseData["inventory-root"];
Hashtable Inventoryroot = (Hashtable)InventoryRoot[0]; // Hashtable Inventoryroot = (Hashtable)InventoryRoot[0];
Inventoryroot["folder_id"] = InventoryFolderID.ToStringHyphenated(); // Inventoryroot["folder_id"] = InventoryFolderID.ToStringHyphenated();
CustomiseLoginResponse(responseData, first, last); CustomiseLoginResponse(responseData, first, last);
@ -189,11 +189,11 @@ namespace OpenSim.UserServer
//copy data to login object //copy data to login object
_login.First = first; _login.First = first;
_login.Last = last; _login.Last = last;
_login.Agent = Agent; _login.Agent = loginResponse.AgentID;
_login.Session = Session; _login.Session = loginResponse.SessionID;
_login.SecureSession = secureSess; _login.SecureSession = loginResponse.SecureSessionID;
_login.BaseFolder = BaseFolderID; _login.BaseFolder = loginResponse.BaseFolderID;
_login.InventoryFolder = InventoryFolderID; _login.InventoryFolder = loginResponse.InventoryFolderID;
//working on local computer if so lets add to the gridserver's list of sessions? //working on local computer if so lets add to the gridserver's list of sessions?
if (m_gridServer.GetName() == "Local") if (m_gridServer.GetName() == "Local")