aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Communications
diff options
context:
space:
mode:
authorSean Dague2008-04-10 13:53:06 +0000
committerSean Dague2008-04-10 13:53:06 +0000
commitc176caeb05c2264654b764e4d010561da60c24fc (patch)
tree87e0cab128ecaac57c5995df4cf5048185fe383f /OpenSim/Region/Communications
parent* Brings back map tile generation based on the terrain. The algorithm produc... (diff)
downloadopensim-SC_OLD-c176caeb05c2264654b764e4d010561da60c24fc.zip
opensim-SC_OLD-c176caeb05c2264654b764e4d010561da60c24fc.tar.gz
opensim-SC_OLD-c176caeb05c2264654b764e4d010561da60c24fc.tar.bz2
opensim-SC_OLD-c176caeb05c2264654b764e4d010561da60c24fc.tar.xz
moved fields to properties for UserDataProfile, which was
actually a little more work than I expected given the copious use of out params.
Diffstat (limited to 'OpenSim/Region/Communications')
-rw-r--r--OpenSim/Region/Communications/Local/LocalLoginService.cs30
-rw-r--r--OpenSim/Region/Communications/Local/LocalUserServices.cs2
-rw-r--r--OpenSim/Region/Communications/OGS1/OGS1UserServices.cs40
3 files changed, 36 insertions, 36 deletions
diff --git a/OpenSim/Region/Communications/Local/LocalLoginService.cs b/OpenSim/Region/Communications/Local/LocalLoginService.cs
index 4632716..d1d3e22 100644
--- a/OpenSim/Region/Communications/Local/LocalLoginService.cs
+++ b/OpenSim/Region/Communications/Local/LocalLoginService.cs
@@ -87,7 +87,7 @@ namespace OpenSim.Region.Communications.Local
87 profile = m_userManager.GetUserProfile(firstname, lastname); 87 profile = m_userManager.GetUserProfile(firstname, lastname);
88 if (profile != null) 88 if (profile != null)
89 { 89 {
90 m_Parent.InventoryService.CreateNewUserInventory(profile.UUID); 90 m_Parent.InventoryService.CreateNewUserInventory(profile.Id);
91 } 91 }
92 92
93 return profile; 93 return profile;
@@ -107,17 +107,17 @@ namespace OpenSim.Region.Communications.Local
107 else 107 else
108 { 108 {
109 m_log.Info( 109 m_log.Info(
110 "[LOGIN]: Authenticating " + profile.username + " " + profile.surname); 110 "[LOGIN]: Authenticating " + profile.FirstName + " " + profile.SurName);
111 111
112 if (!password.StartsWith("$1$")) 112 if (!password.StartsWith("$1$"))
113 password = "$1$" + Util.Md5Hash(password); 113 password = "$1$" + Util.Md5Hash(password);
114 114
115 password = password.Remove(0, 3); //remove $1$ 115 password = password.Remove(0, 3); //remove $1$
116 116
117 string s = Util.Md5Hash(password + ":" + profile.passwordSalt); 117 string s = Util.Md5Hash(password + ":" + profile.PasswordSalt);
118 118
119 bool loginresult = (profile.passwordHash.Equals(s.ToString(), StringComparison.InvariantCultureIgnoreCase) 119 bool loginresult = (profile.PasswordHash.Equals(s.ToString(), StringComparison.InvariantCultureIgnoreCase)
120 || profile.passwordHash.Equals(password, StringComparison.InvariantCultureIgnoreCase)); 120 || profile.PasswordHash.Equals(password, StringComparison.InvariantCultureIgnoreCase));
121 return loginresult; 121 return loginresult;
122 } 122 }
123 } 123 }
@@ -127,18 +127,18 @@ namespace OpenSim.Region.Communications.Local
127 ulong currentRegion = 0; 127 ulong currentRegion = 0;
128 if (startLocationRequest == "last") 128 if (startLocationRequest == "last")
129 { 129 {
130 currentRegion = theUser.currentAgent.currentHandle; 130 currentRegion = theUser.CurrentAgent.currentHandle;
131 } 131 }
132 else if (startLocationRequest == "home") 132 else if (startLocationRequest == "home")
133 { 133 {
134 currentRegion = theUser.homeRegion; 134 currentRegion = theUser.HomeRegion;
135 } 135 }
136 else 136 else
137 { 137 {
138 m_log.Info("[LOGIN]: Got Custom Login URL, but can't process it"); 138 m_log.Info("[LOGIN]: Got Custom Login URL, but can't process it");
139 // LocalBackEndServices can't possibly look up a region by name :( 139 // LocalBackEndServices can't possibly look up a region by name :(
140 // TODO: Parse string in the following format: 'uri:RegionName&X&Y&Z' 140 // TODO: Parse string in the following format: 'uri:RegionName&X&Y&Z'
141 currentRegion = theUser.currentAgent.currentHandle; 141 currentRegion = theUser.CurrentAgent.currentHandle;
142 } 142 }
143 143
144 RegionInfo reg = m_Parent.GridService.RequestNeighbourInfo(currentRegion); 144 RegionInfo reg = m_Parent.GridService.RequestNeighbourInfo(currentRegion);
@@ -147,10 +147,10 @@ namespace OpenSim.Region.Communications.Local
147 { 147 {
148 response.Home = "{'region_handle':[r" + (reg.RegionLocX * Constants.RegionSize).ToString() + ",r" + 148 response.Home = "{'region_handle':[r" + (reg.RegionLocX * Constants.RegionSize).ToString() + ",r" +
149 (reg.RegionLocY * Constants.RegionSize).ToString() + "], " + 149 (reg.RegionLocY * Constants.RegionSize).ToString() + "], " +
150 "'position':[r" + theUser.homeLocation.X.ToString() + ",r" + 150 "'position':[r" + theUser.HomeLocation.X.ToString() + ",r" +
151 theUser.homeLocation.Y.ToString() + ",r" + theUser.homeLocation.Z.ToString() + "], " + 151 theUser.HomeLocation.Y.ToString() + ",r" + theUser.HomeLocation.Z.ToString() + "], " +
152 "'look_at':[r" + theUser.homeLocation.X.ToString() + ",r" + 152 "'look_at':[r" + theUser.HomeLocation.X.ToString() + ",r" +
153 theUser.homeLocation.Y.ToString() + ",r" + theUser.homeLocation.Z.ToString() + "]}"; 153 theUser.HomeLocation.Y.ToString() + ",r" + theUser.HomeLocation.Z.ToString() + "]}";
154 string capsPath = Util.GetRandomCapsPath(); 154 string capsPath = Util.GetRandomCapsPath();
155 response.SimAddress = reg.ExternalEndPoint.Address.ToString(); 155 response.SimAddress = reg.ExternalEndPoint.Address.ToString();
156 response.SimPort = (uint) reg.ExternalEndPoint.Port; 156 response.SimPort = (uint) reg.ExternalEndPoint.Port;
@@ -164,12 +164,12 @@ namespace OpenSim.Region.Communications.Local
164 "[CAPS]: Sending new CAPS seed url {0} to client {1}", 164 "[CAPS]: Sending new CAPS seed url {0} to client {1}",
165 response.SeedCapability, response.AgentID); 165 response.SeedCapability, response.AgentID);
166 166
167 theUser.currentAgent.currentRegion = reg.RegionID; 167 theUser.CurrentAgent.currentRegion = reg.RegionID;
168 theUser.currentAgent.currentHandle = reg.RegionHandle; 168 theUser.CurrentAgent.currentHandle = reg.RegionHandle;
169 169
170 LoginResponse.BuddyList buddyList = new LoginResponse.BuddyList(); 170 LoginResponse.BuddyList buddyList = new LoginResponse.BuddyList();
171 171
172 response.BuddList = ConvertFriendListItem(m_userManager.GetUserFriendList(theUser.UUID)); 172 response.BuddList = ConvertFriendListItem(m_userManager.GetUserFriendList(theUser.Id));
173 173
174 Login _login = new Login(); 174 Login _login = new Login();
175 //copy data to login object 175 //copy data to login object
diff --git a/OpenSim/Region/Communications/Local/LocalUserServices.cs b/OpenSim/Region/Communications/Local/LocalUserServices.cs
index c31367f..00514e8 100644
--- a/OpenSim/Region/Communications/Local/LocalUserServices.cs
+++ b/OpenSim/Region/Communications/Local/LocalUserServices.cs
@@ -84,7 +84,7 @@ namespace OpenSim.Region.Communications.Local
84 } 84 }
85 else 85 else
86 { 86 {
87 m_inventoryService.CreateNewUserInventory(profile.UUID); 87 m_inventoryService.CreateNewUserInventory(profile.Id);
88 } 88 }
89 89
90 return profile; 90 return profile;
diff --git a/OpenSim/Region/Communications/OGS1/OGS1UserServices.cs b/OpenSim/Region/Communications/OGS1/OGS1UserServices.cs
index 79e323a..9796cf4 100644
--- a/OpenSim/Region/Communications/OGS1/OGS1UserServices.cs
+++ b/OpenSim/Region/Communications/OGS1/OGS1UserServices.cs
@@ -60,24 +60,24 @@ namespace OpenSim.Region.Communications.OGS1
60 } 60 }
61 61
62 UserProfileData userData = new UserProfileData(); 62 UserProfileData userData = new UserProfileData();
63 userData.username = (string) data["firstname"]; 63 userData.FirstName = (string) data["firstname"];
64 userData.surname = (string) data["lastname"]; 64 userData.SurName = (string) data["lastname"];
65 userData.UUID = new LLUUID((string) data["uuid"]); 65 userData.Id = new LLUUID((string) data["uuid"]);
66 userData.userInventoryURI = (string) data["server_inventory"]; 66 userData.UserInventoryURI = (string) data["server_inventory"];
67 userData.userAssetURI = (string) data["server_asset"]; 67 userData.UserAssetURI = (string) data["server_asset"];
68 userData.profileFirstText = (string) data["profile_firstlife_about"]; 68 userData.ProfileFirstText = (string) data["profile_firstlife_about"];
69 userData.profileFirstImage = new LLUUID((string) data["profile_firstlife_image"]); 69 userData.ProfileFirstImage = new LLUUID((string) data["profile_firstlife_image"]);
70 userData.profileCanDoMask = Convert.ToUInt32((string) data["profile_can_do"]); 70 userData.ProfileCanDoMask = Convert.ToUInt32((string) data["profile_can_do"]);
71 userData.profileWantDoMask = Convert.ToUInt32(data["profile_want_do"]); 71 userData.ProfileWantDoMask = Convert.ToUInt32(data["profile_want_do"]);
72 userData.profileAboutText = (string)data["profile_about"]; 72 userData.ProfileAboutText = (string)data["profile_about"];
73 userData.profileImage = new LLUUID((string) data["profile_image"]); 73 userData.ProfileImage = new LLUUID((string) data["profile_image"]);
74 userData.lastLogin = Convert.ToInt32((string) data["profile_lastlogin"]); 74 userData.LastLogin = Convert.ToInt32((string) data["profile_lastlogin"]);
75 userData.homeRegion = Convert.ToUInt64((string) data["home_region"]); 75 userData.HomeRegion = Convert.ToUInt64((string) data["home_region"]);
76 userData.homeLocation = 76 userData.HomeLocation =
77 new LLVector3((float) Convert.ToDecimal((string) data["home_coordinates_x"]), 77 new LLVector3((float) Convert.ToDecimal((string) data["home_coordinates_x"]),
78 (float) Convert.ToDecimal((string) data["home_coordinates_y"]), 78 (float) Convert.ToDecimal((string) data["home_coordinates_y"]),
79 (float) Convert.ToDecimal((string) data["home_coordinates_z"])); 79 (float) Convert.ToDecimal((string) data["home_coordinates_z"]));
80 userData.homeLookAt = 80 userData.HomeLookAt =
81 new LLVector3((float) Convert.ToDecimal((string) data["home_look_x"]), 81 new LLVector3((float) Convert.ToDecimal((string) data["home_look_x"]),
82 (float) Convert.ToDecimal((string) data["home_look_y"]), 82 (float) Convert.ToDecimal((string) data["home_look_y"]),
83 (float) Convert.ToDecimal((string) data["home_look_z"])); 83 (float) Convert.ToDecimal((string) data["home_look_z"]));
@@ -306,13 +306,13 @@ namespace OpenSim.Region.Communications.OGS1
306 { 306 {
307 m_log.Debug("[OGS1 USER SERVICES]: Asking UserServer to update profile."); 307 m_log.Debug("[OGS1 USER SERVICES]: Asking UserServer to update profile.");
308 Hashtable param = new Hashtable(); 308 Hashtable param = new Hashtable();
309 param["avatar_uuid"] = UserProfile.UUID.ToString(); 309 param["avatar_uuid"] = UserProfile.Id.ToString();
310 //param["AllowPublish"] = UserProfile.ToString(); 310 //param["AllowPublish"] = UserProfile.ToString();
311 param["FLImageID"] = UserProfile.profileFirstImage.ToString(); 311 param["FLImageID"] = UserProfile.ProfileFirstImage.ToString();
312 param["ImageID"] = UserProfile.profileImage.ToString(); 312 param["ImageID"] = UserProfile.ProfileImage.ToString();
313 //param["MaturePublish"] = MaturePublish.ToString(); 313 //param["MaturePublish"] = MaturePublish.ToString();
314 param["AboutText"] = UserProfile.profileAboutText; 314 param["AboutText"] = UserProfile.ProfileAboutText;
315 param["FLAboutText"] = UserProfile.profileFirstText; 315 param["FLAboutText"] = UserProfile.ProfileFirstText;
316 //param["ProfileURL"] = UserProfile.ProfileURL.ToString(); 316 //param["ProfileURL"] = UserProfile.ProfileURL.ToString();
317 IList parameters = new ArrayList(); 317 IList parameters = new ArrayList();
318 parameters.Add(param); 318 parameters.Add(param);