From ed6168b96b687a2f44177af8200d13b427089099 Mon Sep 17 00:00:00 2001 From: lbsa71 Date: Fri, 5 Oct 2007 11:27:46 +0000 Subject: * UserProfileData meets code conventions --- .../Communications/Local/LocalLoginService.cs | 16 ++++++------- .../Region/Communications/OGS1/OGS1UserServices.cs | 28 +++++++++++----------- 2 files changed, 22 insertions(+), 22 deletions(-) (limited to 'OpenSim/Region') diff --git a/OpenSim/Region/Communications/Local/LocalLoginService.cs b/OpenSim/Region/Communications/Local/LocalLoginService.cs index 9835583..23cab48 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 32f39b4..80b6d74 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) { -- cgit v1.1