diff --git a/OpenSim/Framework/Communications/CommunicationsManager.cs b/OpenSim/Framework/Communications/CommunicationsManager.cs index 5af07f7267..010d5cefac 100644 --- a/OpenSim/Framework/Communications/CommunicationsManager.cs +++ b/OpenSim/Framework/Communications/CommunicationsManager.cs @@ -162,8 +162,8 @@ namespace OpenSim.Framework.Communications if (profileData != null) { LLUUID profileId = profileData.UUID; - string firstname = profileData.username; - string lastname = profileData.surname; + string firstname = profileData.Firstname; + string lastname = profileData.Lastname; remote_client.SendNameReply(profileId, firstname, lastname); } diff --git a/OpenSim/Framework/Communications/LoginService.cs b/OpenSim/Framework/Communications/LoginService.cs index 06abb69994..31c9363b91 100644 --- a/OpenSim/Framework/Communications/LoginService.cs +++ b/OpenSim/Framework/Communications/LoginService.cs @@ -1,287 +1,287 @@ -using System; -using System.Collections; -using System.Collections.Generic; -using System.Reflection; -using System.Security.Cryptography; -using libsecondlife; -using Nwc.XmlRpc; -using OpenSim.Framework.Console; -using OpenSim.Framework.Interfaces; -using OpenSim.Framework.Inventory; +using System; +using System.Collections; +using System.Collections.Generic; +using System.Reflection; +using System.Security.Cryptography; +using libsecondlife; +using Nwc.XmlRpc; +using OpenSim.Framework.Console; +using OpenSim.Framework.Interfaces; +using OpenSim.Framework.Inventory; using OpenSim.Framework.Types; -using OpenSim.Framework.Utilities; - -using OpenSim.Framework.Configuration; -using InventoryFolder = OpenSim.Framework.Inventory.InventoryFolder; - -namespace OpenSim.Framework.UserManagement -{ - public class LoginService - { - protected string m_welcomeMessage = "Welcome to OpenSim"; - protected UserManagerBase m_userManager = null; - - public LoginService(UserManagerBase userManager, string welcomeMess) - { - m_userManager = userManager; - if (welcomeMess != "") - { - m_welcomeMessage = welcomeMess; - } - } - - /// - /// Main user login function - /// - /// The XMLRPC request - /// The response to send - public XmlRpcResponse XmlRpcLoginMethod(XmlRpcRequest request) - { - - System.Console.WriteLine("Attempting login now..."); - XmlRpcResponse response = new XmlRpcResponse(); - Hashtable requestData = (Hashtable)request.Params[0]; - - bool GoodXML = (requestData.Contains("first") && requestData.Contains("last") && requestData.Contains("passwd")); - bool GoodLogin = false; - - UserProfileData userProfile; - LoginResponse logResponse = new LoginResponse(); - - if (GoodXML) - { - string firstname = (string)requestData["first"]; - string lastname = (string)requestData["last"]; - string passwd = (string)requestData["passwd"]; - - userProfile = GetTheUser(firstname, lastname); - if (userProfile == null) - return logResponse.CreateLoginFailedResponse(); - - GoodLogin = AuthenticateUser(userProfile, passwd); - } - else - { - return logResponse.CreateGridErrorResponse(); - } - - if (!GoodLogin) - { - return logResponse.CreateLoginFailedResponse(); - } - else - { - // If we already have a session... - if (userProfile.currentAgent != null && userProfile.currentAgent.agentOnline) - { - // Reject the login - return logResponse.CreateAlreadyLoggedInResponse(); - } - // Otherwise... - // Create a new agent session - CreateAgent(userProfile, request); - - try - { - LLUUID agentID = userProfile.UUID; - - // Inventory Library Section - InventoryData inventData = this.CreateInventoryData(agentID); - ArrayList AgentInventoryArray = inventData.InventoryArray; - - Hashtable InventoryRootHash = new Hashtable(); - InventoryRootHash["folder_id"] = inventData.RootFolderID.ToStringHyphenated(); - ArrayList InventoryRoot = new ArrayList(); - InventoryRoot.Add(InventoryRootHash); - userProfile.rootInventoryFolderID = inventData.RootFolderID; - - // Circuit Code - uint circode = (uint)(Util.RandomClass.Next()); - - logResponse.Lastname = userProfile.surname; - logResponse.Firstname = userProfile.username; - logResponse.AgentID = agentID.ToStringHyphenated(); - logResponse.SessionID = userProfile.currentAgent.sessionID.ToStringHyphenated(); - logResponse.SecureSessionID = userProfile.currentAgent.secureSessionID.ToStringHyphenated(); - logResponse.InventoryRoot = InventoryRoot; - logResponse.InventorySkeleton = AgentInventoryArray; - logResponse.InventoryLibrary = this.GetInventoryLibrary(); - logResponse.InventoryLibraryOwner = this.GetLibraryOwner(); - logResponse.CircuitCode = (Int32)circode; - //logResponse.RegionX = 0; //overwritten - //logResponse.RegionY = 0; //overwritten - logResponse.Home = "!!null temporary value {home}!!"; // Overwritten - //logResponse.LookAt = "\n[r" + TheUser.homeLookAt.X.ToString() + ",r" + TheUser.homeLookAt.Y.ToString() + ",r" + TheUser.homeLookAt.Z.ToString() + "]\n"; - //logResponse.SimAddress = "127.0.0.1"; //overwritten - //logResponse.SimPort = 0; //overwritten - logResponse.Message = this.GetMessage(); - - try - { - this.CustomiseResponse(logResponse, userProfile); - } - catch (Exception e) - { - System.Console.WriteLine(e.ToString()); - return logResponse.CreateDeadRegionResponse(); - //return logResponse.ToXmlRpcResponse(); - } - CommitAgent(ref userProfile); - return logResponse.ToXmlRpcResponse(); - - } - - catch (Exception E) - { - System.Console.WriteLine(E.ToString()); - } - //} - } - return response; - - } - - /// - /// Customises the login response and fills in missing values. - /// - /// The existing response - /// The user profile - public virtual void CustomiseResponse(LoginResponse response, UserProfileData theUser) - { - } - - /// - /// Saves a target agent to the database - /// - /// The users profile - /// Successful? - public bool CommitAgent(ref UserProfileData profile) - { - // Saves the agent to database - return true; - } - - - /// - /// Checks a user against it's password hash - /// - /// The users profile - /// The supplied password - /// Authenticated? - public virtual bool AuthenticateUser(UserProfileData profile, string password) - { - - MainLog.Instance.Verbose( - "Authenticating " + profile.username + " " + profile.surname); - - password = password.Remove(0, 3); //remove $1$ - - string s = Util.Md5Hash(password + ":" + profile.passwordSalt); - - return profile.passwordHash.Equals(s.ToString(), StringComparison.InvariantCultureIgnoreCase); - } - - /// - /// - /// - /// - /// - public void CreateAgent(UserProfileData profile, XmlRpcRequest request) - { - this.m_userManager.CreateAgent(profile, request); - } - - /// - /// - /// - /// - /// - /// - public virtual UserProfileData GetTheUser(string firstname, string lastname) - { - return this.m_userManager.GetUserProfile(firstname, lastname); - } - - /// - /// - /// - /// - public virtual string GetMessage() - { - return m_welcomeMessage; - } - - /// - /// - /// - /// - protected virtual ArrayList GetInventoryLibrary() - { - //return new ArrayList(); - Hashtable TempHash = new Hashtable(); - TempHash["name"] = "OpenSim Library"; - TempHash["parent_id"] = LLUUID.Zero.ToStringHyphenated(); - TempHash["version"] = 1; - TempHash["type_default"] = -1; - TempHash["folder_id"] = "00000112-000f-0000-0000-000100bba000"; - ArrayList temp = new ArrayList(); - temp.Add(TempHash); - - TempHash = new Hashtable(); - TempHash["name"] = "Texture Library"; - TempHash["parent_id"] = "00000112-000f-0000-0000-000100bba000"; - TempHash["version"] = 1; - TempHash["type_default"] = -1; - TempHash["folder_id"] = "00000112-000f-0000-0000-000100bba001"; - temp.Add(TempHash); - return temp; - } - - /// - /// - /// - /// - protected virtual ArrayList GetLibraryOwner() - { - //for now create random inventory library owner - Hashtable TempHash = new Hashtable(); - TempHash["agent_id"] = "11111111-1111-0000-0000-000100bba000"; - ArrayList inventoryLibOwner = new ArrayList(); - inventoryLibOwner.Add(TempHash); - return inventoryLibOwner; - } - - protected virtual InventoryData CreateInventoryData(LLUUID userID) - { - AgentInventory userInventory = new AgentInventory(); - userInventory.CreateRootFolder(userID, false); - - ArrayList AgentInventoryArray = new ArrayList(); - Hashtable TempHash; - foreach (InventoryFolder InvFolder in userInventory.InventoryFolders.Values) - { - TempHash = new Hashtable(); - TempHash["name"] = InvFolder.FolderName; - TempHash["parent_id"] = InvFolder.ParentID.ToStringHyphenated(); - TempHash["version"] = (Int32)InvFolder.Version; - TempHash["type_default"] = (Int32)InvFolder.DefaultType; - TempHash["folder_id"] = InvFolder.FolderID.ToStringHyphenated(); - AgentInventoryArray.Add(TempHash); - } - - return new InventoryData(AgentInventoryArray, userInventory.InventoryRoot.FolderID); - } - - public class InventoryData - { - public ArrayList InventoryArray = null; - public LLUUID RootFolderID = LLUUID.Zero; - - public InventoryData(ArrayList invList, LLUUID rootID) - { - InventoryArray = invList; - RootFolderID = rootID; - } - } - } -} +using OpenSim.Framework.Utilities; + +using OpenSim.Framework.Configuration; +using InventoryFolder = OpenSim.Framework.Inventory.InventoryFolder; + +namespace OpenSim.Framework.UserManagement +{ + public class LoginService + { + protected string m_welcomeMessage = "Welcome to OpenSim"; + protected UserManagerBase m_userManager = null; + + public LoginService(UserManagerBase userManager, string welcomeMess) + { + m_userManager = userManager; + if (welcomeMess != "") + { + m_welcomeMessage = welcomeMess; + } + } + + /// + /// Main user login function + /// + /// The XMLRPC request + /// The response to send + public XmlRpcResponse XmlRpcLoginMethod(XmlRpcRequest request) + { + + System.Console.WriteLine("Attempting login now..."); + XmlRpcResponse response = new XmlRpcResponse(); + Hashtable requestData = (Hashtable)request.Params[0]; + + bool GoodXML = (requestData.Contains("first") && requestData.Contains("last") && requestData.Contains("passwd")); + bool GoodLogin = false; + + UserProfileData userProfile; + LoginResponse logResponse = new LoginResponse(); + + if (GoodXML) + { + string firstname = (string)requestData["first"]; + string lastname = (string)requestData["last"]; + string passwd = (string)requestData["passwd"]; + + userProfile = GetTheUser(firstname, lastname); + if (userProfile == null) + return logResponse.CreateLoginFailedResponse(); + + GoodLogin = AuthenticateUser(userProfile, passwd); + } + else + { + return logResponse.CreateGridErrorResponse(); + } + + if (!GoodLogin) + { + return logResponse.CreateLoginFailedResponse(); + } + else + { + // If we already have a session... + if (userProfile.CurrentAgent != null && userProfile.CurrentAgent.agentOnline) + { + // Reject the login + return logResponse.CreateAlreadyLoggedInResponse(); + } + // Otherwise... + // Create a new agent session + CreateAgent(userProfile, request); + + try + { + LLUUID agentID = userProfile.UUID; + + // Inventory Library Section + InventoryData inventData = this.CreateInventoryData(agentID); + ArrayList AgentInventoryArray = inventData.InventoryArray; + + Hashtable InventoryRootHash = new Hashtable(); + InventoryRootHash["folder_id"] = inventData.RootFolderID.ToStringHyphenated(); + ArrayList InventoryRoot = new ArrayList(); + InventoryRoot.Add(InventoryRootHash); + userProfile.RootInventoryFolderId = inventData.RootFolderID; + + // Circuit Code + uint circode = (uint)(Util.RandomClass.Next()); + + logResponse.Lastname = userProfile.Lastname; + logResponse.Firstname = userProfile.Firstname; + logResponse.AgentID = agentID.ToStringHyphenated(); + logResponse.SessionID = userProfile.CurrentAgent.sessionID.ToStringHyphenated(); + logResponse.SecureSessionID = userProfile.CurrentAgent.secureSessionID.ToStringHyphenated(); + logResponse.InventoryRoot = InventoryRoot; + logResponse.InventorySkeleton = AgentInventoryArray; + logResponse.InventoryLibrary = this.GetInventoryLibrary(); + logResponse.InventoryLibraryOwner = this.GetLibraryOwner(); + logResponse.CircuitCode = (Int32)circode; + //logResponse.RegionX = 0; //overwritten + //logResponse.RegionY = 0; //overwritten + logResponse.Home = "!!null temporary value {home}!!"; // Overwritten + //logResponse.LookAt = "\n[r" + TheUser.homeLookAt.X.ToString() + ",r" + TheUser.homeLookAt.Y.ToString() + ",r" + TheUser.homeLookAt.Z.ToString() + "]\n"; + //logResponse.SimAddress = "127.0.0.1"; //overwritten + //logResponse.SimPort = 0; //overwritten + logResponse.Message = this.GetMessage(); + + try + { + this.CustomiseResponse(logResponse, userProfile); + } + catch (Exception e) + { + System.Console.WriteLine(e.ToString()); + return logResponse.CreateDeadRegionResponse(); + //return logResponse.ToXmlRpcResponse(); + } + CommitAgent(ref userProfile); + return logResponse.ToXmlRpcResponse(); + + } + + catch (Exception E) + { + System.Console.WriteLine(E.ToString()); + } + //} + } + return response; + + } + + /// + /// Customises the login response and fills in missing values. + /// + /// The existing response + /// The user profile + public virtual void CustomiseResponse(LoginResponse response, UserProfileData theUser) + { + } + + /// + /// Saves a target agent to the database + /// + /// The users profile + /// Successful? + public bool CommitAgent(ref UserProfileData profile) + { + // Saves the agent to database + return true; + } + + + /// + /// Checks a user against it's password hash + /// + /// The users profile + /// The supplied password + /// Authenticated? + public virtual bool AuthenticateUser(UserProfileData profile, string password) + { + + MainLog.Instance.Verbose( + "Authenticating " + profile.Firstname + " " + profile.Lastname); + + password = password.Remove(0, 3); //remove $1$ + + string s = Util.Md5Hash(password + ":" + profile.PasswordSalt); + + return profile.PasswordHash.Equals(s.ToString(), StringComparison.InvariantCultureIgnoreCase); + } + + /// + /// + /// + /// + /// + public void CreateAgent(UserProfileData profile, XmlRpcRequest request) + { + this.m_userManager.CreateAgent(profile, request); + } + + /// + /// + /// + /// + /// + /// + public virtual UserProfileData GetTheUser(string firstname, string lastname) + { + return this.m_userManager.GetUserProfile(firstname, lastname); + } + + /// + /// + /// + /// + public virtual string GetMessage() + { + return m_welcomeMessage; + } + + /// + /// + /// + /// + protected virtual ArrayList GetInventoryLibrary() + { + //return new ArrayList(); + Hashtable TempHash = new Hashtable(); + TempHash["name"] = "OpenSim Library"; + TempHash["parent_id"] = LLUUID.Zero.ToStringHyphenated(); + TempHash["version"] = 1; + TempHash["type_default"] = -1; + TempHash["folder_id"] = "00000112-000f-0000-0000-000100bba000"; + ArrayList temp = new ArrayList(); + temp.Add(TempHash); + + TempHash = new Hashtable(); + TempHash["name"] = "Texture Library"; + TempHash["parent_id"] = "00000112-000f-0000-0000-000100bba000"; + TempHash["version"] = 1; + TempHash["type_default"] = -1; + TempHash["folder_id"] = "00000112-000f-0000-0000-000100bba001"; + temp.Add(TempHash); + return temp; + } + + /// + /// + /// + /// + protected virtual ArrayList GetLibraryOwner() + { + //for now create random inventory library owner + Hashtable TempHash = new Hashtable(); + TempHash["agent_id"] = "11111111-1111-0000-0000-000100bba000"; + ArrayList inventoryLibOwner = new ArrayList(); + inventoryLibOwner.Add(TempHash); + return inventoryLibOwner; + } + + protected virtual InventoryData CreateInventoryData(LLUUID userID) + { + AgentInventory userInventory = new AgentInventory(); + userInventory.CreateRootFolder(userID, false); + + ArrayList AgentInventoryArray = new ArrayList(); + Hashtable TempHash; + foreach (InventoryFolder InvFolder in userInventory.InventoryFolders.Values) + { + TempHash = new Hashtable(); + TempHash["name"] = InvFolder.FolderName; + TempHash["parent_id"] = InvFolder.ParentID.ToStringHyphenated(); + TempHash["version"] = (Int32)InvFolder.Version; + TempHash["type_default"] = (Int32)InvFolder.DefaultType; + TempHash["folder_id"] = InvFolder.FolderID.ToStringHyphenated(); + AgentInventoryArray.Add(TempHash); + } + + return new InventoryData(AgentInventoryArray, userInventory.InventoryRoot.FolderID); + } + + public class InventoryData + { + public ArrayList InventoryArray = null; + public LLUUID RootFolderID = LLUUID.Zero; + + public InventoryData(ArrayList invList, LLUUID rootID) + { + InventoryArray = invList; + RootFolderID = rootID; + } + } + } +} diff --git a/OpenSim/Framework/Communications/UserManagerBase.cs b/OpenSim/Framework/Communications/UserManagerBase.cs index 56ed959b52..d04101c32c 100644 --- a/OpenSim/Framework/Communications/UserManagerBase.cs +++ b/OpenSim/Framework/Communications/UserManagerBase.cs @@ -96,7 +96,7 @@ namespace OpenSim.Framework.UserManagement try { UserProfileData profile = plugin.Value.GetUserByUUID(uuid); - profile.currentAgent = getUserAgent(profile.UUID); + profile.CurrentAgent = getUserAgent(profile.UUID); return profile; } catch (Exception e) @@ -121,7 +121,7 @@ namespace OpenSim.Framework.UserManagement try { UserProfileData profile = plugin.Value.GetUserByName(name); - profile.currentAgent = getUserAgent(profile.UUID); + profile.CurrentAgent = getUserAgent(profile.UUID); return profile; } catch (Exception e) @@ -148,7 +148,7 @@ namespace OpenSim.Framework.UserManagement { UserProfileData profile = plugin.Value.GetUserByName(fname,lname); - profile.currentAgent = getUserAgent(profile.UUID); + profile.CurrentAgent = getUserAgent(profile.UUID); return profile; } @@ -233,7 +233,7 @@ namespace OpenSim.Framework.UserManagement public void clearUserAgent(LLUUID agentID) { UserProfileData profile = GetUserProfile(agentID); - profile.currentAgent = null; + profile.CurrentAgent = null; setUserProfile(profile); } @@ -292,8 +292,8 @@ namespace OpenSim.Framework.UserManagement agent.UUID = profile.UUID; // Current position (from Home) - agent.currentHandle = profile.homeRegion; - agent.currentPos = profile.homeLocation; + agent.currentHandle = profile.HomeRegion; + agent.currentPos = profile.HomeLocation; // If user specified additional start, use that if (requestData.ContainsKey("start")) @@ -326,7 +326,7 @@ namespace OpenSim.Framework.UserManagement agent.regionID = new LLUUID(); // Fill in later agent.currentRegion = new LLUUID(); // Fill in later - profile.currentAgent = agent; + profile.CurrentAgent = agent; } /// @@ -349,16 +349,16 @@ namespace OpenSim.Framework.UserManagement public void AddUserProfile(string firstName, string lastName, string pass, uint regX, uint regY) { UserProfileData user = new UserProfileData(); - user.homeLocation = new LLVector3(128, 128, 100); + user.HomeLocation = new LLVector3(128, 128, 100); user.UUID = LLUUID.Random(); - user.username = firstName; - user.surname = lastName; - user.passwordHash = pass; - user.passwordSalt = ""; - user.created = Util.UnixTimeSinceEpoch(); - user.homeLookAt = new LLVector3(100, 100, 100); - user.homeRegionX = regX; - user.homeRegionY = regY; + user.Firstname = firstName; + user.Lastname = lastName; + user.PasswordHash = pass; + user.PasswordSalt = ""; + user.Created = Util.UnixTimeSinceEpoch(); + user.HomeLookAt = new LLVector3(100, 100, 100); + user.HomeRegionX = regX; + user.HomeRegionY = regY; foreach (KeyValuePair plugin in _plugins) { diff --git a/OpenSim/Framework/Data.DB4o/DB4oUserData.cs b/OpenSim/Framework/Data.DB4o/DB4oUserData.cs index 38f1b5511e..e6a856d07b 100644 --- a/OpenSim/Framework/Data.DB4o/DB4oUserData.cs +++ b/OpenSim/Framework/Data.DB4o/DB4oUserData.cs @@ -83,7 +83,7 @@ namespace OpenSim.Framework.Data.DB4o { foreach (UserProfileData profile in manager.userProfiles.Values) { - if (profile.username == fname && profile.surname == lname) + if (profile.Firstname == fname && profile.Lastname == lname) return profile; } return null; @@ -98,7 +98,7 @@ namespace OpenSim.Framework.Data.DB4o { try { - return GetUserByUUID(uuid).currentAgent; + return GetUserByUUID(uuid).CurrentAgent; } catch (Exception) { @@ -126,7 +126,7 @@ namespace OpenSim.Framework.Data.DB4o { try { - return GetUserByName(fname,lname).currentAgent; + return GetUserByName(fname,lname).CurrentAgent; } catch (Exception) { diff --git a/OpenSim/Framework/Data.MySQL/MySQLManager.cs b/OpenSim/Framework/Data.MySQL/MySQLManager.cs index a83ee45a45..e733a83671 100644 --- a/OpenSim/Framework/Data.MySQL/MySQLManager.cs +++ b/OpenSim/Framework/Data.MySQL/MySQLManager.cs @@ -313,36 +313,36 @@ namespace OpenSim.Framework.Data.MySQL if (reader.Read()) { retval.UUID = new LLUUID((string)reader["UUID"]); - retval.username = (string)reader["username"]; - retval.surname = (string)reader["lastname"]; + retval.Firstname = (string)reader["username"]; + retval.Lastname = (string)reader["lastname"]; - retval.passwordHash = (string)reader["passwordHash"]; - retval.passwordSalt = (string)reader["passwordSalt"]; + retval.PasswordHash = (string)reader["passwordHash"]; + retval.PasswordSalt = (string)reader["passwordSalt"]; - retval.homeRegion = Convert.ToUInt64(reader["homeRegion"].ToString()); - retval.homeLocation = new LLVector3( + retval.HomeRegion = Convert.ToUInt64(reader["homeRegion"].ToString()); + retval.HomeLocation = new LLVector3( Convert.ToSingle(reader["homeLocationX"].ToString()), Convert.ToSingle(reader["homeLocationY"].ToString()), Convert.ToSingle(reader["homeLocationZ"].ToString())); - retval.homeLookAt = new LLVector3( + retval.HomeLookAt = new LLVector3( Convert.ToSingle(reader["homeLookAtX"].ToString()), Convert.ToSingle(reader["homeLookAtY"].ToString()), Convert.ToSingle(reader["homeLookAtZ"].ToString())); - retval.created = Convert.ToInt32(reader["created"].ToString()); - retval.lastLogin = Convert.ToInt32(reader["lastLogin"].ToString()); + retval.Created = Convert.ToInt32(reader["created"].ToString()); + retval.LastLogin = Convert.ToInt32(reader["lastLogin"].ToString()); - retval.userInventoryURI = (string)reader["userInventoryURI"]; - retval.userAssetURI = (string)reader["userAssetURI"]; + retval.UserInventoryUri = (string)reader["userInventoryURI"]; + retval.UserAssetUri = (string)reader["userAssetURI"]; - retval.profileCanDoMask = Convert.ToUInt32(reader["profileCanDoMask"].ToString()); - retval.profileWantDoMask = Convert.ToUInt32(reader["profileWantDoMask"].ToString()); + retval.ProfileCanDoMask = Convert.ToUInt32(reader["profileCanDoMask"].ToString()); + retval.ProfileWantDoMask = Convert.ToUInt32(reader["profileWantDoMask"].ToString()); - retval.profileAboutText = (string)reader["profileAboutText"]; - retval.profileFirstText = (string)reader["profileFirstText"]; + retval.ProfileAboutText = (string)reader["profileAboutText"]; + retval.ProfileFirstText = (string)reader["profileFirstText"]; - retval.profileImage = new LLUUID((string)reader["profileImage"]); - retval.profileFirstImage = new LLUUID((string)reader["profileFirstImage"]); + retval.ProfileImage = new LLUUID((string)reader["profileImage"]); + retval.ProfileFirstImage = new LLUUID((string)reader["profileFirstImage"]); } else diff --git a/OpenSim/Framework/Data.MySQL/MySQLUserData.cs b/OpenSim/Framework/Data.MySQL/MySQLUserData.cs index 301550fa71..ae24367fd0 100644 --- a/OpenSim/Framework/Data.MySQL/MySQLUserData.cs +++ b/OpenSim/Framework/Data.MySQL/MySQLUserData.cs @@ -204,9 +204,9 @@ namespace OpenSim.Framework.Data.MySQL { lock (database) { - database.insertUserRow(user.UUID, user.username, user.surname, user.passwordHash, user.passwordSalt, user.homeRegion, user.homeLocation.X, user.homeLocation.Y, user.homeLocation.Z, - user.homeLookAt.X, user.homeLookAt.Y, user.homeLookAt.Z, user.created, user.lastLogin, user.userInventoryURI, user.userAssetURI, user.profileCanDoMask, user.profileWantDoMask, - user.profileAboutText, user.profileFirstText, user.profileImage, user.profileFirstImage); + database.insertUserRow(user.UUID, user.Firstname, user.Lastname, user.PasswordHash, user.PasswordSalt, user.HomeRegion, user.HomeLocation.X, user.HomeLocation.Y, user.HomeLocation.Z, + user.HomeLookAt.X, user.HomeLookAt.Y, user.HomeLookAt.Z, user.Created, user.LastLogin, user.UserInventoryUri, user.UserAssetUri, user.ProfileCanDoMask, user.ProfileWantDoMask, + user.ProfileAboutText, user.ProfileFirstText, user.ProfileImage, user.ProfileFirstImage); } } catch (Exception e) diff --git a/OpenSim/Framework/Data.SQLite/SQLiteUserData.cs b/OpenSim/Framework/Data.SQLite/SQLiteUserData.cs index c7b76595bf..1899733b3b 100644 --- a/OpenSim/Framework/Data.SQLite/SQLiteUserData.cs +++ b/OpenSim/Framework/Data.SQLite/SQLiteUserData.cs @@ -85,7 +85,7 @@ namespace OpenSim.Framework.Data.SQLite UserProfileData user = buildUserProfile(row); row = ds.Tables["useragents"].Rows.Find(uuid); if(row != null) { - user.currentAgent = buildUserAgent(row); + user.CurrentAgent = buildUserAgent(row); } return user; } else { @@ -119,7 +119,7 @@ namespace OpenSim.Framework.Data.SQLite UserProfileData user = buildUserProfile(rows[0]); DataRow row = ds.Tables["useragents"].Rows.Find(user.UUID); if(row != null) { - user.currentAgent = buildUserAgent(row); + user.CurrentAgent = buildUserAgent(row); } return user; } else { @@ -137,7 +137,7 @@ namespace OpenSim.Framework.Data.SQLite { try { - return GetUserByUUID(uuid).currentAgent; + return GetUserByUUID(uuid).CurrentAgent; } catch (Exception) { @@ -165,7 +165,7 @@ namespace OpenSim.Framework.Data.SQLite { try { - return GetUserByName(fname,lname).currentAgent; + return GetUserByName(fname,lname).CurrentAgent; } catch (Exception) { @@ -193,18 +193,18 @@ namespace OpenSim.Framework.Data.SQLite fillUserRow(row, user); } - if(user.currentAgent != null) { + if(user.CurrentAgent != null) { DataTable ua = ds.Tables["useragents"]; row = ua.Rows.Find(user.UUID); if (row == null) { row = ua.NewRow(); - fillUserAgentRow(row, user.currentAgent); + fillUserAgentRow(row, user.CurrentAgent); ua.Rows.Add(row); } else { - fillUserAgentRow(row, user.currentAgent); + fillUserAgentRow(row, user.CurrentAgent); } } MainLog.Instance.Verbose("Syncing user database: " + ds.Tables["users"].Rows.Count + " users stored"); @@ -317,8 +317,8 @@ namespace OpenSim.Framework.Data.SQLite createCol(users, "userInventoryURI", typeof(System.String)); createCol(users, "userAssetURI", typeof(System.String)); createCol(users, "profileCanDoMask", typeof(System.Int32)); - createCol(users, "profileWantDoMask", typeof(System.Int32)); - createCol(users, "profileAboutText", typeof(System.String)); + createCol(users, "ProfileWantDoMask", typeof(System.Int32)); + createCol(users, "ProfileAboutText", typeof(System.String)); createCol(users, "profileFirstText", typeof(System.String)); createCol(users, "profileImage", typeof(System.String)); createCol(users, "profileFirstImage", typeof(System.String)); @@ -367,66 +367,66 @@ namespace OpenSim.Framework.Data.SQLite // back out. Not enough time to figure it out yet. UserProfileData user = new UserProfileData(); user.UUID = new LLUUID((String)row["UUID"]); - user.username = (String)row["username"]; - user.surname = (String)row["surname"]; - user.passwordHash = (String)row["passwordHash"]; - user.passwordSalt = (String)row["passwordSalt"]; + user.Firstname = (String)row["username"]; + user.Lastname = (String)row["surname"]; + user.PasswordHash = (String)row["passwordHash"]; + user.PasswordSalt = (String)row["passwordSalt"]; - user.homeRegionX = Convert.ToUInt32(row["homeRegionX"]); - user.homeRegionY = Convert.ToUInt32(row["homeRegionY"]); - user.homeLocation = new LLVector3( + user.HomeRegionX = Convert.ToUInt32(row["homeRegionX"]); + user.HomeRegionY = Convert.ToUInt32(row["homeRegionY"]); + user.HomeLocation = new LLVector3( Convert.ToSingle(row["homeLocationX"]), Convert.ToSingle(row["homeLocationY"]), Convert.ToSingle(row["homeLocationZ"]) ); - user.homeLookAt = new LLVector3( + user.HomeLookAt = new LLVector3( Convert.ToSingle(row["homeLookAtX"]), Convert.ToSingle(row["homeLookAtY"]), Convert.ToSingle(row["homeLookAtZ"]) ); - user.created = Convert.ToInt32(row["created"]); - user.lastLogin = Convert.ToInt32(row["lastLogin"]); - user.rootInventoryFolderID = new LLUUID((String)row["rootInventoryFolderID"]); - user.userInventoryURI = (String)row["userInventoryURI"]; - user.userAssetURI = (String)row["userAssetURI"]; - user.profileCanDoMask = Convert.ToUInt32(row["profileCanDoMask"]); - user.profileWantDoMask = Convert.ToUInt32(row["profileWantDoMask"]); - user.profileAboutText = (String)row["profileAboutText"]; - user.profileFirstText = (String)row["profileFirstText"]; - user.profileImage = new LLUUID((String)row["profileImage"]); - user.profileFirstImage = new LLUUID((String)row["profileFirstImage"]); + user.Created = Convert.ToInt32(row["created"]); + user.LastLogin = Convert.ToInt32(row["lastLogin"]); + user.RootInventoryFolderId = new LLUUID((String)row["rootInventoryFolderID"]); + user.UserInventoryUri = (String)row["userInventoryURI"]; + user.UserAssetUri = (String)row["userAssetURI"]; + user.ProfileCanDoMask = Convert.ToUInt32(row["profileCanDoMask"]); + user.ProfileWantDoMask = Convert.ToUInt32(row["ProfileWantDoMask"]); + user.ProfileAboutText = (String)row["ProfileAboutText"]; + user.ProfileFirstText = (String)row["profileFirstText"]; + user.ProfileImage = new LLUUID((String)row["profileImage"]); + user.ProfileFirstImage = new LLUUID((String)row["profileFirstImage"]); return user; } private void fillUserRow(DataRow row, UserProfileData user) { row["UUID"] = user.UUID; - row["username"] = user.username; - row["surname"] = user.surname; - row["passwordHash"] = user.passwordHash; - row["passwordSalt"] = user.passwordSalt; + row["username"] = user.Firstname; + row["surname"] = user.Lastname; + row["passwordHash"] = user.PasswordHash; + row["passwordSalt"] = user.PasswordSalt; - row["homeRegionX"] = user.homeRegionX; - row["homeRegionY"] = user.homeRegionY; - row["homeLocationX"] = user.homeLocation.X; - row["homeLocationY"] = user.homeLocation.Y; - row["homeLocationZ"] = user.homeLocation.Z; - row["homeLookAtX"] = user.homeLookAt.X; - row["homeLookAtY"] = user.homeLookAt.Y; - row["homeLookAtZ"] = user.homeLookAt.Z; + row["homeRegionX"] = user.HomeRegionX; + row["homeRegionY"] = user.HomeRegionY; + row["homeLocationX"] = user.HomeLocation.X; + row["homeLocationY"] = user.HomeLocation.Y; + row["homeLocationZ"] = user.HomeLocation.Z; + row["homeLookAtX"] = user.HomeLookAt.X; + row["homeLookAtY"] = user.HomeLookAt.Y; + row["homeLookAtZ"] = user.HomeLookAt.Z; - row["created"] = user.created; - row["lastLogin"] = user.lastLogin; - row["rootInventoryFolderID"] = user.rootInventoryFolderID; - row["userInventoryURI"] = user.userInventoryURI; - row["userAssetURI"] = user.userAssetURI; - row["profileCanDoMask"] = user.profileCanDoMask; - row["profileWantDoMask"] = user.profileWantDoMask; - row["profileAboutText"] = user.profileAboutText; - row["profileFirstText"] = user.profileFirstText; - row["profileImage"] = user.profileImage; - row["profileFirstImage"] = user.profileFirstImage; + row["created"] = user.Created; + row["lastLogin"] = user.LastLogin; + row["rootInventoryFolderID"] = user.RootInventoryFolderId; + row["userInventoryURI"] = user.UserInventoryUri; + row["userAssetURI"] = user.UserAssetUri; + row["profileCanDoMask"] = user.ProfileCanDoMask; + row["ProfileWantDoMask"] = user.ProfileWantDoMask; + row["ProfileAboutText"] = user.ProfileAboutText; + row["profileFirstText"] = user.ProfileFirstText; + row["profileImage"] = user.ProfileImage; + row["profileFirstImage"] = user.ProfileFirstImage; // ADO.NET doesn't handle NULL very well foreach (DataColumn col in ds.Tables["users"].Columns) { diff --git a/OpenSim/Framework/General/Types/UserProfileData.cs b/OpenSim/Framework/General/Types/UserProfileData.cs index 20d822402d..7996975952 100644 --- a/OpenSim/Framework/General/Types/UserProfileData.cs +++ b/OpenSim/Framework/General/Types/UserProfileData.cs @@ -43,94 +43,94 @@ namespace OpenSim.Framework.Types /// /// The first component of a users account name /// - public string username; + public string Firstname; /// /// The second component of a users account name /// - public string surname; + public string Lastname; /// /// A salted hash containing the users password, in the format md5(md5(password) + ":" + salt) /// /// This is double MD5'd because the client sends an unsalted MD5 to the loginserver - public string passwordHash; + public string PasswordHash; /// /// The salt used for the users hash, should be 32 bytes or longer /// - public string passwordSalt; + public string PasswordSalt; /// /// The regionhandle of the users preffered home region. If multiple sims occupy the same spot, the grid may decide which region the user logs into /// - public ulong homeRegion + public ulong HomeRegion { - get { return Helpers.UIntsToLong((homeRegionX * 256), (homeRegionY * 256)); } + get { return Helpers.UIntsToLong((HomeRegionX * 256), (HomeRegionY * 256)); } set { - homeRegionX = (uint)(value >> 40); - homeRegionY = (((uint)(value)) >> 8); + HomeRegionX = (uint)(value >> 40); + HomeRegionY = (((uint)(value)) >> 8); } } - public uint homeRegionX; - public uint homeRegionY; + public uint HomeRegionX; + public uint HomeRegionY; /// /// The coordinates inside the region of the home location /// - public LLVector3 homeLocation; + public LLVector3 HomeLocation; /// /// Where the user will be looking when they rez. /// - public LLVector3 homeLookAt; + public LLVector3 HomeLookAt; /// /// A UNIX Timestamp (seconds since epoch) for the users creation /// - public int created; + public int Created; /// /// A UNIX Timestamp for the users last login date / time /// - public int lastLogin; + public int LastLogin; - public LLUUID rootInventoryFolderID; + public LLUUID RootInventoryFolderId; /// /// A URI to the users inventory server, used for foreigners and large grids /// - public string userInventoryURI = String.Empty; + public string UserInventoryUri = String.Empty; /// /// A URI to the users asset server, used for foreigners and large grids. /// - public string userAssetURI = String.Empty; + public string UserAssetUri = String.Empty; /// /// A uint mask containing the "I can do" fields of the users profile /// - public uint profileCanDoMask; + public uint ProfileCanDoMask; /// /// A uint mask containing the "I want to do" part of the users profile /// - public uint profileWantDoMask; // Profile window "I want to" mask + public uint ProfileWantDoMask; // Profile window "I want to" mask /// /// The about text listed in a users profile. /// - public string profileAboutText = String.Empty; + public string ProfileAboutText = String.Empty; /// /// The first life about text listed in a users profile /// - public string profileFirstText = String.Empty; + public string ProfileFirstText = String.Empty; /// /// The profile image for an avatar stored on the asset server /// - public LLUUID profileImage; + public LLUUID ProfileImage; /// /// The profile image for the users first life tab /// - public LLUUID profileFirstImage; + public LLUUID ProfileFirstImage; /// /// The users last registered agent (filled in on the user server) /// - public UserAgentData currentAgent; + public UserAgentData CurrentAgent; } /// diff --git a/OpenSim/Grid/UserServer/UserLoginService.cs b/OpenSim/Grid/UserServer/UserLoginService.cs index b42427b4bf..120d90c42a 100644 --- a/OpenSim/Grid/UserServer/UserLoginService.cs +++ b/OpenSim/Grid/UserServer/UserLoginService.cs @@ -29,13 +29,13 @@ namespace OpenSim.Grid.UserServer { // Load information from the gridserver SimProfileData SimInfo = new SimProfileData(); - SimInfo = SimInfo.RequestSimProfileData(theUser.currentAgent.currentHandle, m_config.GridServerURL, m_config.GridSendKey, m_config.GridRecvKey); + SimInfo = SimInfo.RequestSimProfileData(theUser.CurrentAgent.currentHandle, m_config.GridServerURL, m_config.GridSendKey, m_config.GridRecvKey); // Customise the response // Home Location response.Home = "{'region_handle':[r" + (SimInfo.regionLocX * 256).ToString() + ",r" + (SimInfo.regionLocY * 256).ToString() + "], " + - "'position':[r" + theUser.homeLocation.X.ToString() + ",r" + theUser.homeLocation.Y.ToString() + ",r" + theUser.homeLocation.Z.ToString() + "], " + - "'look_at':[r" + theUser.homeLocation.X.ToString() + ",r" + theUser.homeLocation.Y.ToString() + ",r" + theUser.homeLocation.Z.ToString() + "]}"; + "'position':[r" + theUser.HomeLocation.X.ToString() + ",r" + theUser.HomeLocation.Y.ToString() + ",r" + theUser.HomeLocation.Z.ToString() + "], " + + "'look_at':[r" + theUser.HomeLocation.X.ToString() + ",r" + theUser.HomeLocation.Y.ToString() + ",r" + theUser.HomeLocation.Z.ToString() + "]}"; // Destination Console.WriteLine("CUSTOMISERESPONSE: Region X: " + SimInfo.regionLocX + "; Region Y: " + SimInfo.regionLocY); @@ -53,23 +53,23 @@ namespace OpenSim.Grid.UserServer // Prepare notification Hashtable SimParams = new Hashtable(); - SimParams["session_id"] = theUser.currentAgent.sessionID.ToString(); - SimParams["secure_session_id"] = theUser.currentAgent.secureSessionID.ToString(); - SimParams["firstname"] = theUser.username; - SimParams["lastname"] = theUser.surname; + SimParams["session_id"] = theUser.CurrentAgent.sessionID.ToString(); + SimParams["secure_session_id"] = theUser.CurrentAgent.secureSessionID.ToString(); + SimParams["firstname"] = theUser.Firstname; + SimParams["lastname"] = theUser.Lastname; SimParams["agent_id"] = theUser.UUID.ToString(); SimParams["circuit_code"] = (Int32)Convert.ToUInt32(response.CircuitCode); - SimParams["startpos_x"] = theUser.currentAgent.currentPos.X.ToString(); - SimParams["startpos_y"] = theUser.currentAgent.currentPos.Y.ToString(); - SimParams["startpos_z"] = theUser.currentAgent.currentPos.Z.ToString(); - SimParams["regionhandle"] = theUser.currentAgent.currentHandle.ToString(); + SimParams["startpos_x"] = theUser.CurrentAgent.currentPos.X.ToString(); + SimParams["startpos_y"] = theUser.CurrentAgent.currentPos.Y.ToString(); + SimParams["startpos_z"] = theUser.CurrentAgent.currentPos.Z.ToString(); + SimParams["regionhandle"] = theUser.CurrentAgent.currentHandle.ToString(); SimParams["caps_path"] = capsPath; ArrayList SendParams = new ArrayList(); SendParams.Add(SimParams); // Update agent with target sim - theUser.currentAgent.currentRegion = SimInfo.UUID; - theUser.currentAgent.currentHandle = SimInfo.regionHandle; + theUser.CurrentAgent.currentRegion = SimInfo.UUID; + theUser.CurrentAgent.currentHandle = SimInfo.regionHandle; System.Console.WriteLine("Informing region --> " + SimInfo.httpServerURI); // Send diff --git a/OpenSim/Grid/UserServer/UserManager.cs b/OpenSim/Grid/UserServer/UserManager.cs index 5db49010a6..c2d0a7a8e7 100644 --- a/OpenSim/Grid/UserServer/UserManager.cs +++ b/OpenSim/Grid/UserServer/UserManager.cs @@ -83,31 +83,31 @@ namespace OpenSim.Grid.UserServer Hashtable responseData = new Hashtable(); // Account information - responseData["firstname"] = profile.username; - responseData["lastname"] = profile.surname; + responseData["firstname"] = profile.Firstname; + responseData["lastname"] = profile.Lastname; responseData["uuid"] = profile.UUID.ToStringHyphenated(); // Server Information - responseData["server_inventory"] = profile.userInventoryURI; - responseData["server_asset"] = profile.userAssetURI; + responseData["server_inventory"] = profile.UserInventoryUri; + responseData["server_asset"] = profile.UserAssetUri; // Profile Information - responseData["profile_about"] = profile.profileAboutText; - responseData["profile_firstlife_about"] = profile.profileFirstText; - responseData["profile_firstlife_image"] = profile.profileFirstImage.ToStringHyphenated(); - responseData["profile_can_do"] = profile.profileCanDoMask.ToString(); - responseData["profile_want_do"] = profile.profileWantDoMask.ToString(); - responseData["profile_image"] = profile.profileImage.ToStringHyphenated(); - responseData["profile_created"] = profile.created.ToString(); - responseData["profile_lastlogin"] = profile.lastLogin.ToString(); + responseData["profile_about"] = profile.ProfileAboutText; + responseData["profile_firstlife_about"] = profile.ProfileFirstText; + responseData["profile_firstlife_image"] = profile.ProfileFirstImage.ToStringHyphenated(); + responseData["profile_can_do"] = profile.ProfileCanDoMask.ToString(); + responseData["profile_want_do"] = profile.ProfileWantDoMask.ToString(); + responseData["profile_image"] = profile.ProfileImage.ToStringHyphenated(); + responseData["profile_created"] = profile.Created.ToString(); + responseData["profile_lastlogin"] = profile.LastLogin.ToString(); // Home region information - responseData["home_coordinates_x"] = profile.homeLocation.X.ToString(); - responseData["home_coordinates_y"] = profile.homeLocation.Y.ToString(); - responseData["home_coordinates_z"] = profile.homeLocation.Z.ToString(); + responseData["home_coordinates_x"] = profile.HomeLocation.X.ToString(); + responseData["home_coordinates_y"] = profile.HomeLocation.Y.ToString(); + responseData["home_coordinates_z"] = profile.HomeLocation.Z.ToString(); - responseData["home_region"] = profile.homeRegion.ToString(); + responseData["home_region"] = profile.HomeRegion.ToString(); - responseData["home_look_x"] = profile.homeLookAt.X.ToString(); - responseData["home_look_y"] = profile.homeLookAt.Y.ToString(); - responseData["home_look_z"] = profile.homeLookAt.Z.ToString(); + responseData["home_look_x"] = profile.HomeLookAt.X.ToString(); + responseData["home_look_y"] = profile.HomeLookAt.Y.ToString(); + responseData["home_look_z"] = profile.HomeLookAt.Z.ToString(); response.Value = responseData; return response; diff --git a/OpenSim/Region/Communications/Local/LocalLoginService.cs b/OpenSim/Region/Communications/Local/LocalLoginService.cs index 9835583e91..23cab48040 100644 --- a/OpenSim/Region/Communications/Local/LocalLoginService.cs +++ b/OpenSim/Region/Communications/Local/LocalLoginService.cs @@ -70,26 +70,26 @@ namespace OpenSim.Region.Communications.Local } else { - Console.WriteLine("Authenticating " + profile.username + " " + profile.surname); + Console.WriteLine("Authenticating " + profile.Firstname + " " + profile.Lastname); password = password.Remove(0, 3); //remove $1$ - string s = Util.Md5Hash(password + ":" + profile.passwordSalt); + string s = Util.Md5Hash(password + ":" + profile.PasswordSalt); - return profile.passwordHash.Equals(s.ToString(), StringComparison.InvariantCultureIgnoreCase); + return profile.PasswordHash.Equals(s.ToString(), StringComparison.InvariantCultureIgnoreCase); } } public override void CustomiseResponse(LoginResponse response, UserProfileData theUser) { - ulong currentRegion = theUser.currentAgent.currentHandle; + ulong currentRegion = theUser.CurrentAgent.currentHandle; RegionInfo reg = m_Parent.GridService.RequestNeighbourInfo(currentRegion); if (reg != null) { response.Home = "{'region_handle':[r" + (reg.RegionLocX * 256).ToString() + ",r" + (reg.RegionLocY * 256).ToString() + "], " + - "'position':[r" + theUser.homeLocation.X.ToString() + ",r" + theUser.homeLocation.Y.ToString() + ",r" + theUser.homeLocation.Z.ToString() + "], " + - "'look_at':[r" + theUser.homeLocation.X.ToString() + ",r" + theUser.homeLocation.Y.ToString() + ",r" + theUser.homeLocation.Z.ToString() + "]}"; + "'position':[r" + theUser.HomeLocation.X.ToString() + ",r" + theUser.HomeLocation.Y.ToString() + ",r" + theUser.HomeLocation.Z.ToString() + "], " + + "'look_at':[r" + theUser.HomeLocation.X.ToString() + ",r" + theUser.HomeLocation.Y.ToString() + ",r" + theUser.HomeLocation.Z.ToString() + "]}"; string capsPath = Util.GetRandomCapsPath(); response.SimAddress = reg.ExternalEndPoint.Address.ToString(); response.SimPort = (Int32)reg.ExternalEndPoint.Port; @@ -98,8 +98,8 @@ namespace OpenSim.Region.Communications.Local response.SeedCapability = "http://" + reg.ExternalHostName + ":" + this.serversInfo.HttpListenerPort.ToString() + "/CAPS/" + capsPath + "0000/"; // response.SeedCapability = "http://" + reg.ExternalHostName + ":" + this.serversInfo.HttpListenerPort.ToString() + "/CapsSeed/" + capsPath + "0000/"; - theUser.currentAgent.currentRegion = reg.SimUUID; - theUser.currentAgent.currentHandle = reg.RegionHandle; + theUser.CurrentAgent.currentRegion = reg.SimUUID; + theUser.CurrentAgent.currentHandle = reg.RegionHandle; Login _login = new Login(); //copy data to login object diff --git a/OpenSim/Region/Communications/OGS1/OGS1UserServices.cs b/OpenSim/Region/Communications/OGS1/OGS1UserServices.cs index 32f39b457b..80b6d74f9d 100644 --- a/OpenSim/Region/Communications/OGS1/OGS1UserServices.cs +++ b/OpenSim/Region/Communications/OGS1/OGS1UserServices.cs @@ -24,26 +24,26 @@ namespace OpenSim.Region.Communications.OGS1 } UserProfileData userData = new UserProfileData(); - userData.username = (string)data["firstname"]; - userData.surname = (string)data["lastname"]; + userData.Firstname = (string)data["firstname"]; + userData.Lastname = (string)data["lastname"]; userData.UUID = new LLUUID((string)data["uuid"]); - userData.userInventoryURI = (string)data["server_inventory"]; - userData.userAssetURI = (string)data["server_asset"]; - userData.profileFirstText = (string)data["profile_firstlife_about"]; - userData.profileFirstImage = new LLUUID((string)data["profile_firstlife_image"]); - userData.profileCanDoMask = Convert.ToUInt32((string)data["profile_can_do"]); - userData.profileWantDoMask = Convert.ToUInt32(data["profile_want_do"]); - userData.profileImage = new LLUUID((string)data["profile_image"]); - userData.lastLogin = Convert.ToInt32((string)data["profile_lastlogin"]); - userData.homeRegion = Convert.ToUInt64((string)data["home_region"]); - userData.homeLocation = new LLVector3((float)Convert.ToDecimal((string)data["home_coordinates_x"]), (float)Convert.ToDecimal((string)data["home_coordinates_y"]), (float)Convert.ToDecimal((string)data["home_coordinates_z"])); - userData.homeLookAt = new LLVector3((float)Convert.ToDecimal((string)data["home_look_x"]), (float)Convert.ToDecimal((string)data["home_look_y"]), (float)Convert.ToDecimal((string)data["home_look_z"])); + userData.UserInventoryUri = (string)data["server_inventory"]; + userData.UserAssetUri = (string)data["server_asset"]; + userData.ProfileFirstText = (string)data["profile_firstlife_about"]; + userData.ProfileFirstImage = new LLUUID((string)data["profile_firstlife_image"]); + userData.ProfileCanDoMask = Convert.ToUInt32((string)data["profile_can_do"]); + userData.ProfileWantDoMask = Convert.ToUInt32(data["profile_want_do"]); + userData.ProfileImage = new LLUUID((string)data["profile_image"]); + userData.LastLogin = Convert.ToInt32((string)data["profile_lastlogin"]); + userData.HomeRegion = Convert.ToUInt64((string)data["home_region"]); + userData.HomeLocation = new LLVector3((float)Convert.ToDecimal((string)data["home_coordinates_x"]), (float)Convert.ToDecimal((string)data["home_coordinates_y"]), (float)Convert.ToDecimal((string)data["home_coordinates_z"])); + userData.HomeLookAt = new LLVector3((float)Convert.ToDecimal((string)data["home_look_x"]), (float)Convert.ToDecimal((string)data["home_look_y"]), (float)Convert.ToDecimal((string)data["home_look_z"])); return userData; } public UserProfileData GetUserProfile(string firstName, string lastName) { - return GetUserProfile(firstName + " " + lastName); + return GetUserProfile(firstName, lastName); } public UserProfileData GetUserProfile(string name) {