diff options
author | Sean Dague | 2008-04-10 13:53:06 +0000 |
---|---|---|
committer | Sean Dague | 2008-04-10 13:53:06 +0000 |
commit | c176caeb05c2264654b764e4d010561da60c24fc (patch) | |
tree | 87e0cab128ecaac57c5995df4cf5048185fe383f /OpenSim | |
parent | * Brings back map tile generation based on the terrain. The algorithm produc... (diff) | |
download | opensim-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 '')
24 files changed, 595 insertions, 382 deletions
diff --git a/OpenSim/Data/DB4o/DB4oManager.cs b/OpenSim/Data/DB4o/DB4oManager.cs index d9085c5..13bd61c 100644 --- a/OpenSim/Data/DB4o/DB4oManager.cs +++ b/OpenSim/Data/DB4o/DB4oManager.cs | |||
@@ -125,10 +125,10 @@ namespace OpenSim.Data.DB4o | |||
125 | IObjectSet result = database.Get(typeof (UserProfileData)); | 125 | IObjectSet result = database.Get(typeof (UserProfileData)); |
126 | foreach (UserProfileData row in result) | 126 | foreach (UserProfileData row in result) |
127 | { | 127 | { |
128 | if (userProfiles.ContainsKey(row.UUID)) | 128 | if (userProfiles.ContainsKey(row.Id)) |
129 | userProfiles[row.UUID] = row; | 129 | userProfiles[row.Id] = row; |
130 | else | 130 | else |
131 | userProfiles.Add(row.UUID, row); | 131 | userProfiles.Add(row.Id, row); |
132 | } | 132 | } |
133 | database.Close(); | 133 | database.Close(); |
134 | } | 134 | } |
@@ -145,13 +145,13 @@ namespace OpenSim.Data.DB4o | |||
145 | /// <returns>true on success, false on fail to persist to db</returns> | 145 | /// <returns>true on success, false on fail to persist to db</returns> |
146 | public bool UpdateRecord(UserProfileData record) | 146 | public bool UpdateRecord(UserProfileData record) |
147 | { | 147 | { |
148 | if (userProfiles.ContainsKey(record.UUID)) | 148 | if (userProfiles.ContainsKey(record.Id)) |
149 | { | 149 | { |
150 | userProfiles[record.UUID] = record; | 150 | userProfiles[record.Id] = record; |
151 | } | 151 | } |
152 | else | 152 | else |
153 | { | 153 | { |
154 | userProfiles.Add(record.UUID, record); | 154 | userProfiles.Add(record.Id, record); |
155 | } | 155 | } |
156 | 156 | ||
157 | try | 157 | try |
diff --git a/OpenSim/Data/DB4o/DB4oUserData.cs b/OpenSim/Data/DB4o/DB4oUserData.cs index 62671e3..d0108ab 100644 --- a/OpenSim/Data/DB4o/DB4oUserData.cs +++ b/OpenSim/Data/DB4o/DB4oUserData.cs | |||
@@ -85,7 +85,7 @@ namespace OpenSim.Data.DB4o | |||
85 | { | 85 | { |
86 | foreach (UserProfileData profile in manager.userProfiles.Values) | 86 | foreach (UserProfileData profile in manager.userProfiles.Values) |
87 | { | 87 | { |
88 | if (profile.username == fname && profile.surname == lname) | 88 | if (profile.FirstName == fname && profile.SurName == lname) |
89 | return profile; | 89 | return profile; |
90 | } | 90 | } |
91 | return null; | 91 | return null; |
@@ -100,7 +100,7 @@ namespace OpenSim.Data.DB4o | |||
100 | { | 100 | { |
101 | try | 101 | try |
102 | { | 102 | { |
103 | return GetUserByUUID(uuid).currentAgent; | 103 | return GetUserByUUID(uuid).CurrentAgent; |
104 | } | 104 | } |
105 | catch (Exception) | 105 | catch (Exception) |
106 | { | 106 | { |
@@ -128,7 +128,7 @@ namespace OpenSim.Data.DB4o | |||
128 | { | 128 | { |
129 | try | 129 | try |
130 | { | 130 | { |
131 | return GetUserByName(fname, lname).currentAgent; | 131 | return GetUserByName(fname, lname).CurrentAgent; |
132 | } | 132 | } |
133 | catch (Exception) | 133 | catch (Exception) |
134 | { | 134 | { |
@@ -138,7 +138,7 @@ namespace OpenSim.Data.DB4o | |||
138 | public void StoreWebLoginKey(LLUUID AgentID, LLUUID WebLoginKey) | 138 | public void StoreWebLoginKey(LLUUID AgentID, LLUUID WebLoginKey) |
139 | { | 139 | { |
140 | UserProfileData user = GetUserByUUID(AgentID); | 140 | UserProfileData user = GetUserByUUID(AgentID); |
141 | user.webLoginKey = WebLoginKey; | 141 | user.WebLoginKey = WebLoginKey; |
142 | UpdateUserProfile(user); | 142 | UpdateUserProfile(user); |
143 | 143 | ||
144 | } | 144 | } |
diff --git a/OpenSim/Data/MSSQL/MSSQLManager.cs b/OpenSim/Data/MSSQL/MSSQLManager.cs index 5154092..e33468a 100644 --- a/OpenSim/Data/MSSQL/MSSQLManager.cs +++ b/OpenSim/Data/MSSQL/MSSQLManager.cs | |||
@@ -300,38 +300,38 @@ namespace OpenSim.Data.MSSQL | |||
300 | 300 | ||
301 | if (reader.Read()) | 301 | if (reader.Read()) |
302 | { | 302 | { |
303 | retval.UUID = new LLUUID((string)reader["UUID"]); | 303 | retval.Id = new LLUUID((string)reader["UUID"]); |
304 | retval.username = (string)reader["username"]; | 304 | retval.FirstName = (string)reader["username"]; |
305 | retval.surname = (string)reader["lastname"]; | 305 | retval.SurName = (string)reader["lastname"]; |
306 | 306 | ||
307 | retval.passwordHash = (string)reader["passwordHash"]; | 307 | retval.PasswordHash = (string)reader["passwordHash"]; |
308 | retval.passwordSalt = (string)reader["passwordSalt"]; | 308 | retval.PasswordSalt = (string)reader["passwordSalt"]; |
309 | 309 | ||
310 | retval.homeRegion = Convert.ToUInt64(reader["homeRegion"].ToString()); | 310 | retval.HomeRegion = Convert.ToUInt64(reader["homeRegion"].ToString()); |
311 | retval.homeLocation = new LLVector3( | 311 | retval.HomeLocation = new LLVector3( |
312 | Convert.ToSingle(reader["homeLocationX"].ToString()), | 312 | Convert.ToSingle(reader["homeLocationX"].ToString()), |
313 | Convert.ToSingle(reader["homeLocationY"].ToString()), | 313 | Convert.ToSingle(reader["homeLocationY"].ToString()), |
314 | Convert.ToSingle(reader["homeLocationZ"].ToString())); | 314 | Convert.ToSingle(reader["homeLocationZ"].ToString())); |
315 | retval.homeLookAt = new LLVector3( | 315 | retval.HomeLookAt = new LLVector3( |
316 | Convert.ToSingle(reader["homeLookAtX"].ToString()), | 316 | Convert.ToSingle(reader["homeLookAtX"].ToString()), |
317 | Convert.ToSingle(reader["homeLookAtY"].ToString()), | 317 | Convert.ToSingle(reader["homeLookAtY"].ToString()), |
318 | Convert.ToSingle(reader["homeLookAtZ"].ToString())); | 318 | Convert.ToSingle(reader["homeLookAtZ"].ToString())); |
319 | 319 | ||
320 | retval.created = Convert.ToInt32(reader["created"].ToString()); | 320 | retval.Created = Convert.ToInt32(reader["created"].ToString()); |
321 | retval.lastLogin = Convert.ToInt32(reader["lastLogin"].ToString()); | 321 | retval.LastLogin = Convert.ToInt32(reader["lastLogin"].ToString()); |
322 | 322 | ||
323 | retval.userInventoryURI = (string)reader["userInventoryURI"]; | 323 | retval.UserInventoryURI = (string)reader["userInventoryURI"]; |
324 | retval.userAssetURI = (string)reader["userAssetURI"]; | 324 | retval.UserAssetURI = (string)reader["userAssetURI"]; |
325 | 325 | ||
326 | retval.profileCanDoMask = Convert.ToUInt32(reader["profileCanDoMask"].ToString()); | 326 | retval.ProfileCanDoMask = Convert.ToUInt32(reader["profileCanDoMask"].ToString()); |
327 | retval.profileWantDoMask = Convert.ToUInt32(reader["profileWantDoMask"].ToString()); | 327 | retval.ProfileWantDoMask = Convert.ToUInt32(reader["profileWantDoMask"].ToString()); |
328 | 328 | ||
329 | retval.profileAboutText = (string)reader["profileAboutText"]; | 329 | retval.ProfileAboutText = (string)reader["profileAboutText"]; |
330 | retval.profileFirstText = (string)reader["profileFirstText"]; | 330 | retval.ProfileFirstText = (string)reader["profileFirstText"]; |
331 | 331 | ||
332 | retval.profileImage = new LLUUID((string)reader["profileImage"]); | 332 | retval.ProfileImage = new LLUUID((string)reader["profileImage"]); |
333 | retval.profileFirstImage = new LLUUID((string)reader["profileFirstImage"]); | 333 | retval.ProfileFirstImage = new LLUUID((string)reader["profileFirstImage"]); |
334 | retval.webLoginKey = new LLUUID((string)reader["webLoginKey"]); | 334 | retval.WebLoginKey = new LLUUID((string)reader["webLoginKey"]); |
335 | } | 335 | } |
336 | else | 336 | else |
337 | { | 337 | { |
diff --git a/OpenSim/Data/MSSQL/MSSQLUserData.cs b/OpenSim/Data/MSSQL/MSSQLUserData.cs index c045084..aae0095 100644 --- a/OpenSim/Data/MSSQL/MSSQLUserData.cs +++ b/OpenSim/Data/MSSQL/MSSQLUserData.cs | |||
@@ -453,7 +453,7 @@ namespace OpenSim.Data.MSSQL | |||
453 | override public UserAgentData GetAgentByName(string user, string last) | 453 | override public UserAgentData GetAgentByName(string user, string last) |
454 | { | 454 | { |
455 | UserProfileData profile = GetUserByName(user, last); | 455 | UserProfileData profile = GetUserByName(user, last); |
456 | return GetAgentByUUID(profile.UUID); | 456 | return GetAgentByUUID(profile.Id); |
457 | } | 457 | } |
458 | 458 | ||
459 | /// <summary> | 459 | /// <summary> |
@@ -491,7 +491,7 @@ namespace OpenSim.Data.MSSQL | |||
491 | override public void StoreWebLoginKey(LLUUID AgentID, LLUUID WebLoginKey) | 491 | override public void StoreWebLoginKey(LLUUID AgentID, LLUUID WebLoginKey) |
492 | { | 492 | { |
493 | UserProfileData user = GetUserByUUID(AgentID); | 493 | UserProfileData user = GetUserByUUID(AgentID); |
494 | user.webLoginKey = WebLoginKey; | 494 | user.WebLoginKey = WebLoginKey; |
495 | UpdateUserProfile(user); | 495 | UpdateUserProfile(user); |
496 | 496 | ||
497 | } | 497 | } |
@@ -505,14 +505,14 @@ namespace OpenSim.Data.MSSQL | |||
505 | { | 505 | { |
506 | lock (database) | 506 | lock (database) |
507 | { | 507 | { |
508 | InsertUserRow(user.UUID, user.username, user.surname, user.passwordHash, user.passwordSalt, | 508 | InsertUserRow(user.Id, user.FirstName, user.SurName, user.PasswordHash, user.PasswordSalt, |
509 | user.homeRegion, user.homeLocation.X, user.homeLocation.Y, | 509 | user.HomeRegion, user.HomeLocation.X, user.HomeLocation.Y, |
510 | user.homeLocation.Z, | 510 | user.HomeLocation.Z, |
511 | user.homeLookAt.X, user.homeLookAt.Y, user.homeLookAt.Z, user.created, | 511 | user.HomeLookAt.X, user.HomeLookAt.Y, user.HomeLookAt.Z, user.Created, |
512 | user.lastLogin, user.userInventoryURI, user.userAssetURI, | 512 | user.LastLogin, user.UserInventoryURI, user.UserAssetURI, |
513 | user.profileCanDoMask, user.profileWantDoMask, | 513 | user.ProfileCanDoMask, user.ProfileWantDoMask, |
514 | user.profileAboutText, user.profileFirstText, user.profileImage, | 514 | user.ProfileAboutText, user.ProfileFirstText, user.ProfileImage, |
515 | user.profileFirstImage, user.webLoginKey); | 515 | user.ProfileFirstImage, user.WebLoginKey); |
516 | } | 516 | } |
517 | } | 517 | } |
518 | catch (Exception e) | 518 | catch (Exception e) |
@@ -651,30 +651,30 @@ namespace OpenSim.Data.MSSQL | |||
651 | "profileFirstImage = @profileFirstImage, " + | 651 | "profileFirstImage = @profileFirstImage, " + |
652 | "webLoginKey = @webLoginKey where " + | 652 | "webLoginKey = @webLoginKey where " + |
653 | "UUID = @keyUUUID;", database.getConnection()); | 653 | "UUID = @keyUUUID;", database.getConnection()); |
654 | SqlParameter param1 = new SqlParameter("@uuid", user.UUID.ToString()); | 654 | SqlParameter param1 = new SqlParameter("@uuid", user.Id.ToString()); |
655 | SqlParameter param2 = new SqlParameter("@username", user.username); | 655 | SqlParameter param2 = new SqlParameter("@username", user.FirstName); |
656 | SqlParameter param3 = new SqlParameter("@lastname", user.surname); | 656 | SqlParameter param3 = new SqlParameter("@lastname", user.SurName); |
657 | SqlParameter param4 = new SqlParameter("@passwordHash", user.passwordHash); | 657 | SqlParameter param4 = new SqlParameter("@passwordHash", user.PasswordHash); |
658 | SqlParameter param5 = new SqlParameter("@passwordSalt", user.passwordSalt); | 658 | SqlParameter param5 = new SqlParameter("@passwordSalt", user.PasswordSalt); |
659 | SqlParameter param6 = new SqlParameter("@homeRegion", Convert.ToInt64(user.homeRegion)); | 659 | SqlParameter param6 = new SqlParameter("@homeRegion", Convert.ToInt64(user.HomeRegion)); |
660 | SqlParameter param7 = new SqlParameter("@homeLocationX", user.homeLocation.X); | 660 | SqlParameter param7 = new SqlParameter("@homeLocationX", user.HomeLocation.X); |
661 | SqlParameter param8 = new SqlParameter("@homeLocationY", user.homeLocation.Y); | 661 | SqlParameter param8 = new SqlParameter("@homeLocationY", user.HomeLocation.Y); |
662 | SqlParameter param9 = new SqlParameter("@homeLocationZ", user.homeLocation.Y); | 662 | SqlParameter param9 = new SqlParameter("@homeLocationZ", user.HomeLocation.Y); |
663 | SqlParameter param10 = new SqlParameter("@homeLookAtX", user.homeLookAt.X); | 663 | SqlParameter param10 = new SqlParameter("@homeLookAtX", user.HomeLookAt.X); |
664 | SqlParameter param11 = new SqlParameter("@homeLookAtY", user.homeLookAt.Y); | 664 | SqlParameter param11 = new SqlParameter("@homeLookAtY", user.HomeLookAt.Y); |
665 | SqlParameter param12 = new SqlParameter("@homeLookAtZ", user.homeLookAt.Z); | 665 | SqlParameter param12 = new SqlParameter("@homeLookAtZ", user.HomeLookAt.Z); |
666 | SqlParameter param13 = new SqlParameter("@created", Convert.ToInt32(user.created)); | 666 | SqlParameter param13 = new SqlParameter("@created", Convert.ToInt32(user.Created)); |
667 | SqlParameter param14 = new SqlParameter("@lastLogin", Convert.ToInt32(user.lastLogin)); | 667 | SqlParameter param14 = new SqlParameter("@lastLogin", Convert.ToInt32(user.LastLogin)); |
668 | SqlParameter param15 = new SqlParameter("@userInventoryURI", user.userInventoryURI); | 668 | SqlParameter param15 = new SqlParameter("@userInventoryURI", user.UserInventoryURI); |
669 | SqlParameter param16 = new SqlParameter("@userAssetURI", user.userAssetURI); | 669 | SqlParameter param16 = new SqlParameter("@userAssetURI", user.UserAssetURI); |
670 | SqlParameter param17 = new SqlParameter("@profileCanDoMask", Convert.ToInt32(user.profileCanDoMask)); | 670 | SqlParameter param17 = new SqlParameter("@profileCanDoMask", Convert.ToInt32(user.ProfileCanDoMask)); |
671 | SqlParameter param18 = new SqlParameter("@profileWantDoMask", Convert.ToInt32(user.profileWantDoMask)); | 671 | SqlParameter param18 = new SqlParameter("@profileWantDoMask", Convert.ToInt32(user.ProfileWantDoMask)); |
672 | SqlParameter param19 = new SqlParameter("@profileAboutText", user.profileAboutText); | 672 | SqlParameter param19 = new SqlParameter("@profileAboutText", user.ProfileAboutText); |
673 | SqlParameter param20 = new SqlParameter("@profileFirstText", user.profileFirstText); | 673 | SqlParameter param20 = new SqlParameter("@profileFirstText", user.ProfileFirstText); |
674 | SqlParameter param21 = new SqlParameter("@profileImage", user.profileImage.ToString()); | 674 | SqlParameter param21 = new SqlParameter("@profileImage", user.ProfileImage.ToString()); |
675 | SqlParameter param22 = new SqlParameter("@profileFirstImage", user.profileFirstImage.ToString()); | 675 | SqlParameter param22 = new SqlParameter("@profileFirstImage", user.ProfileFirstImage.ToString()); |
676 | SqlParameter param23 = new SqlParameter("@keyUUUID", user.UUID.ToString()); | 676 | SqlParameter param23 = new SqlParameter("@keyUUUID", user.Id.ToString()); |
677 | SqlParameter param24 = new SqlParameter("@webLoginKey", user.webLoginKey.UUID.ToString()); | 677 | SqlParameter param24 = new SqlParameter("@webLoginKey", user.WebLoginKey.UUID.ToString()); |
678 | command.Parameters.Add(param1); | 678 | command.Parameters.Add(param1); |
679 | command.Parameters.Add(param2); | 679 | command.Parameters.Add(param2); |
680 | command.Parameters.Add(param3); | 680 | command.Parameters.Add(param3); |
diff --git a/OpenSim/Data/MySQL/MySQLManager.cs b/OpenSim/Data/MySQL/MySQLManager.cs index 0d36136..110f192 100644 --- a/OpenSim/Data/MySQL/MySQLManager.cs +++ b/OpenSim/Data/MySQL/MySQLManager.cs | |||
@@ -427,60 +427,71 @@ namespace OpenSim.Data.MySQL | |||
427 | 427 | ||
428 | if (reader.Read()) | 428 | if (reader.Read()) |
429 | { | 429 | { |
430 | if (!LLUUID.TryParse((string)reader["UUID"], out retval.UUID)) | 430 | LLUUID id; |
431 | if (!LLUUID.TryParse((string)reader["UUID"], out id)) | ||
431 | return null; | 432 | return null; |
432 | retval.username = (string) reader["username"]; | ||
433 | retval.surname = (string) reader["lastname"]; | ||
434 | 433 | ||
435 | retval.passwordHash = (string) reader["passwordHash"]; | 434 | retval.Id = id; |
436 | retval.passwordSalt = (string) reader["passwordSalt"]; | 435 | retval.FirstName = (string) reader["username"]; |
436 | retval.SurName = (string) reader["lastname"]; | ||
437 | |||
438 | retval.PasswordHash = (string) reader["passwordHash"]; | ||
439 | retval.PasswordSalt = (string) reader["passwordSalt"]; | ||
437 | 440 | ||
438 | retval.homeRegion = Convert.ToUInt64(reader["homeRegion"].ToString()); | 441 | retval.HomeRegion = Convert.ToUInt64(reader["homeRegion"].ToString()); |
439 | retval.homeLocation = new LLVector3( | 442 | retval.HomeLocation = new LLVector3( |
440 | Convert.ToSingle(reader["homeLocationX"].ToString()), | 443 | Convert.ToSingle(reader["homeLocationX"].ToString()), |
441 | Convert.ToSingle(reader["homeLocationY"].ToString()), | 444 | Convert.ToSingle(reader["homeLocationY"].ToString()), |
442 | Convert.ToSingle(reader["homeLocationZ"].ToString())); | 445 | Convert.ToSingle(reader["homeLocationZ"].ToString())); |
443 | retval.homeLookAt = new LLVector3( | 446 | retval.HomeLookAt = new LLVector3( |
444 | Convert.ToSingle(reader["homeLookAtX"].ToString()), | 447 | Convert.ToSingle(reader["homeLookAtX"].ToString()), |
445 | Convert.ToSingle(reader["homeLookAtY"].ToString()), | 448 | Convert.ToSingle(reader["homeLookAtY"].ToString()), |
446 | Convert.ToSingle(reader["homeLookAtZ"].ToString())); | 449 | Convert.ToSingle(reader["homeLookAtZ"].ToString())); |
447 | 450 | ||
448 | retval.created = Convert.ToInt32(reader["created"].ToString()); | 451 | retval.Created = Convert.ToInt32(reader["created"].ToString()); |
449 | retval.lastLogin = Convert.ToInt32(reader["lastLogin"].ToString()); | 452 | retval.LastLogin = Convert.ToInt32(reader["lastLogin"].ToString()); |
450 | 453 | ||
451 | retval.userInventoryURI = (string) reader["userInventoryURI"]; | 454 | retval.UserInventoryURI = (string) reader["userInventoryURI"]; |
452 | retval.userAssetURI = (string) reader["userAssetURI"]; | 455 | retval.UserAssetURI = (string) reader["userAssetURI"]; |
453 | 456 | ||
454 | retval.profileCanDoMask = Convert.ToUInt32(reader["profileCanDoMask"].ToString()); | 457 | retval.ProfileCanDoMask = Convert.ToUInt32(reader["profileCanDoMask"].ToString()); |
455 | retval.profileWantDoMask = Convert.ToUInt32(reader["profileWantDoMask"].ToString()); | 458 | retval.ProfileWantDoMask = Convert.ToUInt32(reader["profileWantDoMask"].ToString()); |
456 | 459 | ||
457 | if (reader.IsDBNull(reader.GetOrdinal("profileAboutText"))) | 460 | if (reader.IsDBNull(reader.GetOrdinal("profileAboutText"))) |
458 | retval.profileAboutText = ""; | 461 | retval.ProfileAboutText = ""; |
459 | else | 462 | else |
460 | retval.profileAboutText = (string) reader["profileAboutText"]; | 463 | retval.ProfileAboutText = (string) reader["profileAboutText"]; |
461 | 464 | ||
462 | if (reader.IsDBNull(reader.GetOrdinal("profileFirstText"))) | 465 | if (reader.IsDBNull(reader.GetOrdinal("profileFirstText"))) |
463 | retval.profileFirstText = ""; | 466 | retval.ProfileFirstText = ""; |
464 | else | 467 | else |
465 | retval.profileFirstText = (string)reader["profileFirstText"]; | 468 | retval.ProfileFirstText = (string)reader["profileFirstText"]; |
466 | 469 | ||
467 | if (reader.IsDBNull(reader.GetOrdinal("profileImage"))) | 470 | if (reader.IsDBNull(reader.GetOrdinal("profileImage"))) |
468 | retval.profileImage = LLUUID.Zero; | 471 | retval.ProfileImage = LLUUID.Zero; |
469 | else | 472 | else { |
470 | LLUUID.TryParse((string)reader["profileImage"], out retval.profileImage); | 473 | LLUUID tmp; |
474 | LLUUID.TryParse((string)reader["profileImage"], out tmp); | ||
475 | retval.ProfileImage = tmp; | ||
476 | } | ||
471 | 477 | ||
472 | if (reader.IsDBNull(reader.GetOrdinal("profileFirstImage"))) | 478 | if (reader.IsDBNull(reader.GetOrdinal("profileFirstImage"))) |
473 | retval.profileFirstImage = LLUUID.Zero; | 479 | retval.ProfileFirstImage = LLUUID.Zero; |
474 | else | 480 | else { |
475 | LLUUID.TryParse((string)reader["profileFirstImage"], out retval.profileFirstImage); | 481 | LLUUID tmp; |
482 | LLUUID.TryParse((string)reader["profileFirstImage"], out tmp); | ||
483 | retval.ProfileFirstImage = tmp; | ||
484 | } | ||
476 | 485 | ||
477 | if(reader.IsDBNull(reader.GetOrdinal("webLoginKey"))) | 486 | if(reader.IsDBNull(reader.GetOrdinal("webLoginKey"))) |
478 | { | 487 | { |
479 | retval.webLoginKey = LLUUID.Zero; | 488 | retval.WebLoginKey = LLUUID.Zero; |
480 | } | 489 | } |
481 | else | 490 | else |
482 | { | 491 | { |
483 | LLUUID.TryParse((string)reader["webLoginKey"], out retval.webLoginKey); | 492 | LLUUID tmp; |
493 | LLUUID.TryParse((string)reader["webLoginKey"], out tmp); | ||
494 | retval.WebLoginKey = tmp; | ||
484 | } | 495 | } |
485 | } | 496 | } |
486 | else | 497 | else |
diff --git a/OpenSim/Data/MySQL/MySQLUserData.cs b/OpenSim/Data/MySQL/MySQLUserData.cs index bd094f6..5654207 100644 --- a/OpenSim/Data/MySQL/MySQLUserData.cs +++ b/OpenSim/Data/MySQL/MySQLUserData.cs | |||
@@ -475,7 +475,7 @@ namespace OpenSim.Data.MySQL | |||
475 | override public UserAgentData GetAgentByName(string user, string last) | 475 | override public UserAgentData GetAgentByName(string user, string last) |
476 | { | 476 | { |
477 | UserProfileData profile = GetUserByName(user, last); | 477 | UserProfileData profile = GetUserByName(user, last); |
478 | return GetAgentByUUID(profile.UUID); | 478 | return GetAgentByUUID(profile.Id); |
479 | } | 479 | } |
480 | 480 | ||
481 | override public void StoreWebLoginKey(LLUUID AgentID, LLUUID WebLoginKey) | 481 | override public void StoreWebLoginKey(LLUUID AgentID, LLUUID WebLoginKey) |
@@ -547,14 +547,14 @@ namespace OpenSim.Data.MySQL | |||
547 | { | 547 | { |
548 | lock (database) | 548 | lock (database) |
549 | { | 549 | { |
550 | database.insertUserRow(user.UUID, user.username, user.surname, user.passwordHash, user.passwordSalt, | 550 | database.insertUserRow(user.Id, user.FirstName, user.SurName, user.PasswordHash, user.PasswordSalt, |
551 | user.homeRegion, user.homeLocation.X, user.homeLocation.Y, | 551 | user.HomeRegion, user.HomeLocation.X, user.HomeLocation.Y, |
552 | user.homeLocation.Z, | 552 | user.HomeLocation.Z, |
553 | user.homeLookAt.X, user.homeLookAt.Y, user.homeLookAt.Z, user.created, | 553 | user.HomeLookAt.X, user.HomeLookAt.Y, user.HomeLookAt.Z, user.Created, |
554 | user.lastLogin, user.userInventoryURI, user.userAssetURI, | 554 | user.LastLogin, user.UserInventoryURI, user.UserAssetURI, |
555 | user.profileCanDoMask, user.profileWantDoMask, | 555 | user.ProfileCanDoMask, user.ProfileWantDoMask, |
556 | user.profileAboutText, user.profileFirstText, user.profileImage, | 556 | user.ProfileAboutText, user.ProfileFirstText, user.ProfileImage, |
557 | user.profileFirstImage, user.webLoginKey); | 557 | user.ProfileFirstImage, user.WebLoginKey); |
558 | } | 558 | } |
559 | } | 559 | } |
560 | catch (Exception e) | 560 | catch (Exception e) |
@@ -590,11 +590,11 @@ namespace OpenSim.Data.MySQL | |||
590 | /// <param name="user">The profile data to use to update the DB</param> | 590 | /// <param name="user">The profile data to use to update the DB</param> |
591 | override public bool UpdateUserProfile(UserProfileData user) | 591 | override public bool UpdateUserProfile(UserProfileData user) |
592 | { | 592 | { |
593 | database.updateUserRow(user.UUID, user.username, user.surname, user.passwordHash, user.passwordSalt, | 593 | database.updateUserRow(user.Id, user.FirstName, user.SurName, user.PasswordHash, user.PasswordSalt, |
594 | user.homeRegion, user.homeLocation.X, user.homeLocation.Y, user.homeLocation.Z, user.homeLookAt.X, | 594 | user.HomeRegion, user.HomeLocation.X, user.HomeLocation.Y, user.HomeLocation.Z, user.HomeLookAt.X, |
595 | user.homeLookAt.Y, user.homeLookAt.Z, user.created, user.lastLogin, user.userInventoryURI, | 595 | user.HomeLookAt.Y, user.HomeLookAt.Z, user.Created, user.LastLogin, user.UserInventoryURI, |
596 | user.userAssetURI, user.profileCanDoMask, user.profileWantDoMask, user.profileAboutText, | 596 | user.UserAssetURI, user.ProfileCanDoMask, user.ProfileWantDoMask, user.ProfileAboutText, |
597 | user.profileFirstText, user.profileImage, user.profileFirstImage, user.webLoginKey); | 597 | user.ProfileFirstText, user.ProfileImage, user.ProfileFirstImage, user.WebLoginKey); |
598 | return true; | 598 | return true; |
599 | } | 599 | } |
600 | 600 | ||
diff --git a/OpenSim/Data/SQLite/SQLiteUserData.cs b/OpenSim/Data/SQLite/SQLiteUserData.cs index ad3d1a4..e395565 100644 --- a/OpenSim/Data/SQLite/SQLiteUserData.cs +++ b/OpenSim/Data/SQLite/SQLiteUserData.cs | |||
@@ -114,7 +114,7 @@ namespace OpenSim.Data.SQLite | |||
114 | row = ds.Tables["useragents"].Rows.Find(Util.ToRawUuidString(uuid)); | 114 | row = ds.Tables["useragents"].Rows.Find(Util.ToRawUuidString(uuid)); |
115 | if (row != null) | 115 | if (row != null) |
116 | { | 116 | { |
117 | user.currentAgent = buildUserAgent(row); | 117 | user.CurrentAgent = buildUserAgent(row); |
118 | } | 118 | } |
119 | return user; | 119 | return user; |
120 | } | 120 | } |
@@ -135,10 +135,10 @@ namespace OpenSim.Data.SQLite | |||
135 | if (rows.Length > 0) | 135 | if (rows.Length > 0) |
136 | { | 136 | { |
137 | UserProfileData user = buildUserProfile(rows[0]); | 137 | UserProfileData user = buildUserProfile(rows[0]); |
138 | DataRow row = ds.Tables["useragents"].Rows.Find(Util.ToRawUuidString(user.UUID)); | 138 | DataRow row = ds.Tables["useragents"].Rows.Find(Util.ToRawUuidString(user.Id)); |
139 | if (row != null) | 139 | if (row != null) |
140 | { | 140 | { |
141 | user.currentAgent = buildUserAgent(row); | 141 | user.CurrentAgent = buildUserAgent(row); |
142 | } | 142 | } |
143 | return user; | 143 | return user; |
144 | } | 144 | } |
@@ -297,7 +297,7 @@ namespace OpenSim.Data.SQLite | |||
297 | { | 297 | { |
298 | try | 298 | try |
299 | { | 299 | { |
300 | return GetUserByUUID(uuid).currentAgent; | 300 | return GetUserByUUID(uuid).CurrentAgent; |
301 | } | 301 | } |
302 | catch (Exception) | 302 | catch (Exception) |
303 | { | 303 | { |
@@ -325,7 +325,7 @@ namespace OpenSim.Data.SQLite | |||
325 | { | 325 | { |
326 | try | 326 | try |
327 | { | 327 | { |
328 | return GetUserByName(fname, lname).currentAgent; | 328 | return GetUserByName(fname, lname).CurrentAgent; |
329 | } | 329 | } |
330 | catch (Exception) | 330 | catch (Exception) |
331 | { | 331 | { |
@@ -347,7 +347,7 @@ namespace OpenSim.Data.SQLite | |||
347 | else | 347 | else |
348 | { | 348 | { |
349 | UserProfileData user = GetUserByUUID(AgentID); | 349 | UserProfileData user = GetUserByUUID(AgentID); |
350 | user.webLoginKey = WebLoginKey; | 350 | user.WebLoginKey = WebLoginKey; |
351 | fillUserRow(row, user); | 351 | fillUserRow(row, user); |
352 | da.Update(ds, "users"); | 352 | da.Update(ds, "users"); |
353 | 353 | ||
@@ -365,7 +365,7 @@ namespace OpenSim.Data.SQLite | |||
365 | DataTable users = ds.Tables["users"]; | 365 | DataTable users = ds.Tables["users"]; |
366 | lock (ds) | 366 | lock (ds) |
367 | { | 367 | { |
368 | DataRow row = users.Rows.Find(Util.ToRawUuidString(user.UUID)); | 368 | DataRow row = users.Rows.Find(Util.ToRawUuidString(user.Id)); |
369 | if (row == null) | 369 | if (row == null) |
370 | { | 370 | { |
371 | row = users.NewRow(); | 371 | row = users.NewRow(); |
@@ -381,19 +381,19 @@ namespace OpenSim.Data.SQLite | |||
381 | // useragents table once the useragent is null | 381 | // useragents table once the useragent is null |
382 | // | 382 | // |
383 | // A database guy should look at this and figure out the best way to clear the useragents table. | 383 | // A database guy should look at this and figure out the best way to clear the useragents table. |
384 | if (user.currentAgent != null) | 384 | if (user.CurrentAgent != null) |
385 | { | 385 | { |
386 | DataTable ua = ds.Tables["useragents"]; | 386 | DataTable ua = ds.Tables["useragents"]; |
387 | row = ua.Rows.Find(Util.ToRawUuidString(user.UUID)); | 387 | row = ua.Rows.Find(Util.ToRawUuidString(user.Id)); |
388 | if (row == null) | 388 | if (row == null) |
389 | { | 389 | { |
390 | row = ua.NewRow(); | 390 | row = ua.NewRow(); |
391 | fillUserAgentRow(row, user.currentAgent); | 391 | fillUserAgentRow(row, user.CurrentAgent); |
392 | ua.Rows.Add(row); | 392 | ua.Rows.Add(row); |
393 | } | 393 | } |
394 | else | 394 | else |
395 | { | 395 | { |
396 | fillUserAgentRow(row, user.currentAgent); | 396 | fillUserAgentRow(row, user.CurrentAgent); |
397 | } | 397 | } |
398 | } | 398 | } |
399 | else | 399 | else |
@@ -401,7 +401,7 @@ namespace OpenSim.Data.SQLite | |||
401 | // I just added this to help the standalone login situation. | 401 | // I just added this to help the standalone login situation. |
402 | //It still needs to be looked at by a Database guy | 402 | //It still needs to be looked at by a Database guy |
403 | DataTable ua = ds.Tables["useragents"]; | 403 | DataTable ua = ds.Tables["useragents"]; |
404 | row = ua.Rows.Find(Util.ToRawUuidString(user.UUID)); | 404 | row = ua.Rows.Find(Util.ToRawUuidString(user.Id)); |
405 | 405 | ||
406 | if (row == null) | 406 | if (row == null) |
407 | { | 407 | { |
@@ -591,70 +591,74 @@ namespace OpenSim.Data.SQLite | |||
591 | // interesting has to be done to actually get these values | 591 | // interesting has to be done to actually get these values |
592 | // back out. Not enough time to figure it out yet. | 592 | // back out. Not enough time to figure it out yet. |
593 | UserProfileData user = new UserProfileData(); | 593 | UserProfileData user = new UserProfileData(); |
594 | LLUUID.TryParse((String)row["UUID"], out user.UUID); | 594 | LLUUID tmp; |
595 | user.username = (String) row["username"]; | 595 | LLUUID.TryParse((String)row["UUID"], out tmp); |
596 | user.surname = (String) row["surname"]; | 596 | user.Id = tmp; |
597 | user.passwordHash = (String) row["passwordHash"]; | 597 | user.FirstName = (String) row["username"]; |
598 | user.passwordSalt = (String) row["passwordSalt"]; | 598 | user.SurName = (String) row["surname"]; |
599 | 599 | user.PasswordHash = (String) row["passwordHash"]; | |
600 | user.homeRegionX = Convert.ToUInt32(row["homeRegionX"]); | 600 | user.PasswordSalt = (String) row["passwordSalt"]; |
601 | user.homeRegionY = Convert.ToUInt32(row["homeRegionY"]); | 601 | |
602 | user.homeLocation = new LLVector3( | 602 | user.HomeRegionX = Convert.ToUInt32(row["homeRegionX"]); |
603 | user.HomeRegionY = Convert.ToUInt32(row["homeRegionY"]); | ||
604 | user.HomeLocation = new LLVector3( | ||
603 | Convert.ToSingle(row["homeLocationX"]), | 605 | Convert.ToSingle(row["homeLocationX"]), |
604 | Convert.ToSingle(row["homeLocationY"]), | 606 | Convert.ToSingle(row["homeLocationY"]), |
605 | Convert.ToSingle(row["homeLocationZ"]) | 607 | Convert.ToSingle(row["homeLocationZ"]) |
606 | ); | 608 | ); |
607 | user.homeLookAt = new LLVector3( | 609 | user.HomeLookAt = new LLVector3( |
608 | Convert.ToSingle(row["homeLookAtX"]), | 610 | Convert.ToSingle(row["homeLookAtX"]), |
609 | Convert.ToSingle(row["homeLookAtY"]), | 611 | Convert.ToSingle(row["homeLookAtY"]), |
610 | Convert.ToSingle(row["homeLookAtZ"]) | 612 | Convert.ToSingle(row["homeLookAtZ"]) |
611 | ); | 613 | ); |
612 | user.created = Convert.ToInt32(row["created"]); | 614 | user.Created = Convert.ToInt32(row["created"]); |
613 | user.lastLogin = Convert.ToInt32(row["lastLogin"]); | 615 | user.LastLogin = Convert.ToInt32(row["lastLogin"]); |
614 | user.rootInventoryFolderID = new LLUUID((String) row["rootInventoryFolderID"]); | 616 | user.RootInventoryFolderID = new LLUUID((String) row["rootInventoryFolderID"]); |
615 | user.userInventoryURI = (String) row["userInventoryURI"]; | 617 | user.UserInventoryURI = (String) row["userInventoryURI"]; |
616 | user.userAssetURI = (String) row["userAssetURI"]; | 618 | user.UserAssetURI = (String) row["userAssetURI"]; |
617 | user.profileCanDoMask = Convert.ToUInt32(row["profileCanDoMask"]); | 619 | user.ProfileCanDoMask = Convert.ToUInt32(row["profileCanDoMask"]); |
618 | user.profileWantDoMask = Convert.ToUInt32(row["profileWantDoMask"]); | 620 | user.ProfileWantDoMask = Convert.ToUInt32(row["profileWantDoMask"]); |
619 | user.profileAboutText = (String) row["profileAboutText"]; | 621 | user.ProfileAboutText = (String) row["profileAboutText"]; |
620 | user.profileFirstText = (String) row["profileFirstText"]; | 622 | user.ProfileFirstText = (String) row["profileFirstText"]; |
621 | LLUUID.TryParse((String)row["profileImage"], out user.profileImage); | 623 | LLUUID.TryParse((String)row["profileImage"], out tmp); |
622 | LLUUID.TryParse((String)row["profileFirstImage"], out user.profileFirstImage); | 624 | user.ProfileImage = tmp; |
623 | user.webLoginKey = new LLUUID((String) row["webLoginKey"]); | 625 | LLUUID.TryParse((String)row["profileFirstImage"], out tmp); |
626 | user.ProfileFirstImage = tmp; | ||
627 | user.WebLoginKey = new LLUUID((String) row["webLoginKey"]); | ||
624 | 628 | ||
625 | return user; | 629 | return user; |
626 | } | 630 | } |
627 | 631 | ||
628 | private void fillUserRow(DataRow row, UserProfileData user) | 632 | private void fillUserRow(DataRow row, UserProfileData user) |
629 | { | 633 | { |
630 | row["UUID"] = Util.ToRawUuidString(user.UUID); | 634 | row["UUID"] = Util.ToRawUuidString(user.Id); |
631 | row["username"] = user.username; | 635 | row["username"] = user.FirstName; |
632 | row["surname"] = user.surname; | 636 | row["surname"] = user.SurName; |
633 | row["passwordHash"] = user.passwordHash; | 637 | row["passwordHash"] = user.PasswordHash; |
634 | row["passwordSalt"] = user.passwordSalt; | 638 | row["passwordSalt"] = user.PasswordSalt; |
635 | 639 | ||
636 | 640 | ||
637 | row["homeRegionX"] = user.homeRegionX; | 641 | row["homeRegionX"] = user.HomeRegionX; |
638 | row["homeRegionY"] = user.homeRegionY; | 642 | row["homeRegionY"] = user.HomeRegionY; |
639 | row["homeLocationX"] = user.homeLocation.X; | 643 | row["homeLocationX"] = user.HomeLocation.X; |
640 | row["homeLocationY"] = user.homeLocation.Y; | 644 | row["homeLocationY"] = user.HomeLocation.Y; |
641 | row["homeLocationZ"] = user.homeLocation.Z; | 645 | row["homeLocationZ"] = user.HomeLocation.Z; |
642 | row["homeLookAtX"] = user.homeLookAt.X; | 646 | row["homeLookAtX"] = user.HomeLookAt.X; |
643 | row["homeLookAtY"] = user.homeLookAt.Y; | 647 | row["homeLookAtY"] = user.HomeLookAt.Y; |
644 | row["homeLookAtZ"] = user.homeLookAt.Z; | 648 | row["homeLookAtZ"] = user.HomeLookAt.Z; |
645 | 649 | ||
646 | row["created"] = user.created; | 650 | row["created"] = user.Created; |
647 | row["lastLogin"] = user.lastLogin; | 651 | row["lastLogin"] = user.LastLogin; |
648 | row["rootInventoryFolderID"] = user.rootInventoryFolderID; | 652 | row["rootInventoryFolderID"] = user.RootInventoryFolderID; |
649 | row["userInventoryURI"] = user.userInventoryURI; | 653 | row["userInventoryURI"] = user.UserInventoryURI; |
650 | row["userAssetURI"] = user.userAssetURI; | 654 | row["userAssetURI"] = user.UserAssetURI; |
651 | row["profileCanDoMask"] = user.profileCanDoMask; | 655 | row["profileCanDoMask"] = user.ProfileCanDoMask; |
652 | row["profileWantDoMask"] = user.profileWantDoMask; | 656 | row["profileWantDoMask"] = user.ProfileWantDoMask; |
653 | row["profileAboutText"] = user.profileAboutText; | 657 | row["profileAboutText"] = user.ProfileAboutText; |
654 | row["profileFirstText"] = user.profileFirstText; | 658 | row["profileFirstText"] = user.ProfileFirstText; |
655 | row["profileImage"] = user.profileImage; | 659 | row["profileImage"] = user.ProfileImage; |
656 | row["profileFirstImage"] = user.profileFirstImage; | 660 | row["profileFirstImage"] = user.ProfileFirstImage; |
657 | row["webLoginKey"] = user.webLoginKey; | 661 | row["webLoginKey"] = user.WebLoginKey; |
658 | 662 | ||
659 | // ADO.NET doesn't handle NULL very well | 663 | // ADO.NET doesn't handle NULL very well |
660 | foreach (DataColumn col in ds.Tables["users"].Columns) | 664 | foreach (DataColumn col in ds.Tables["users"].Columns) |
diff --git a/OpenSim/Framework/Communications/Cache/CachedUserInfo.cs b/OpenSim/Framework/Communications/Cache/CachedUserInfo.cs index e39333b..75fe1aa 100644 --- a/OpenSim/Framework/Communications/Cache/CachedUserInfo.cs +++ b/OpenSim/Framework/Communications/Cache/CachedUserInfo.cs | |||
@@ -114,7 +114,7 @@ namespace OpenSim.Framework.Communications.Cache | |||
114 | // "[INVENTORY CACHE]: Received folder {0} {1} for user {2}", | 114 | // "[INVENTORY CACHE]: Received folder {0} {1} for user {2}", |
115 | // folderInfo.name, folderInfo.folderID, userID); | 115 | // folderInfo.name, folderInfo.folderID, userID); |
116 | 116 | ||
117 | if (userID == UserProfile.UUID) | 117 | if (userID == UserProfile.Id) |
118 | { | 118 | { |
119 | if (RootFolder == null) | 119 | if (RootFolder == null) |
120 | { | 120 | { |
@@ -169,7 +169,7 @@ namespace OpenSim.Framework.Communications.Cache | |||
169 | /// <param name="folderInfo"></param> | 169 | /// <param name="folderInfo"></param> |
170 | public void ItemReceive(LLUUID userID, InventoryItemBase itemInfo) | 170 | public void ItemReceive(LLUUID userID, InventoryItemBase itemInfo) |
171 | { | 171 | { |
172 | if ((userID == UserProfile.UUID) && (RootFolder != null)) | 172 | if ((userID == UserProfile.Id) && (RootFolder != null)) |
173 | { | 173 | { |
174 | if (itemInfo.Folder == RootFolder.ID) | 174 | if (itemInfo.Folder == RootFolder.ID) |
175 | { | 175 | { |
@@ -194,7 +194,7 @@ namespace OpenSim.Framework.Communications.Cache | |||
194 | 194 | ||
195 | public void AddItem(LLUUID userID, InventoryItemBase itemInfo) | 195 | public void AddItem(LLUUID userID, InventoryItemBase itemInfo) |
196 | { | 196 | { |
197 | if ((userID == UserProfile.UUID) && (RootFolder != null)) | 197 | if ((userID == UserProfile.Id) && (RootFolder != null)) |
198 | { | 198 | { |
199 | ItemReceive(userID, itemInfo); | 199 | ItemReceive(userID, itemInfo); |
200 | m_parentCommsManager.InventoryService.AddNewInventoryItem(userID, itemInfo); | 200 | m_parentCommsManager.InventoryService.AddNewInventoryItem(userID, itemInfo); |
@@ -203,7 +203,7 @@ namespace OpenSim.Framework.Communications.Cache | |||
203 | 203 | ||
204 | public void UpdateItem(LLUUID userID, InventoryItemBase itemInfo) | 204 | public void UpdateItem(LLUUID userID, InventoryItemBase itemInfo) |
205 | { | 205 | { |
206 | if ((userID == UserProfile.UUID) && (RootFolder != null)) | 206 | if ((userID == UserProfile.Id) && (RootFolder != null)) |
207 | { | 207 | { |
208 | m_parentCommsManager.InventoryService.AddNewInventoryItem(userID, itemInfo); | 208 | m_parentCommsManager.InventoryService.AddNewInventoryItem(userID, itemInfo); |
209 | } | 209 | } |
@@ -212,7 +212,7 @@ namespace OpenSim.Framework.Communications.Cache | |||
212 | public bool DeleteItem(LLUUID userID, InventoryItemBase item) | 212 | public bool DeleteItem(LLUUID userID, InventoryItemBase item) |
213 | { | 213 | { |
214 | bool result = false; | 214 | bool result = false; |
215 | if ((userID == UserProfile.UUID) && (RootFolder != null)) | 215 | if ((userID == UserProfile.Id) && (RootFolder != null)) |
216 | { | 216 | { |
217 | result = RootFolder.DeleteItem(item.ID); | 217 | result = RootFolder.DeleteItem(item.ID); |
218 | if (result) | 218 | if (result) |
diff --git a/OpenSim/Framework/Communications/CommunicationsManager.cs b/OpenSim/Framework/Communications/CommunicationsManager.cs index 95a0e05..6b01d8f 100644 --- a/OpenSim/Framework/Communications/CommunicationsManager.cs +++ b/OpenSim/Framework/Communications/CommunicationsManager.cs | |||
@@ -164,9 +164,9 @@ namespace OpenSim.Framework.Communications | |||
164 | } | 164 | } |
165 | else | 165 | else |
166 | { | 166 | { |
167 | m_inventoryService.CreateNewUserInventory(userProf.UUID); | 167 | m_inventoryService.CreateNewUserInventory(userProf.Id); |
168 | m_log.Info("[USERS]: Created new inventory set for " + firstName + " " + lastName); | 168 | m_log.Info("[USERS]: Created new inventory set for " + firstName + " " + lastName); |
169 | return userProf.UUID; | 169 | return userProf.Id; |
170 | } | 170 | } |
171 | } | 171 | } |
172 | 172 | ||
@@ -249,9 +249,9 @@ namespace OpenSim.Framework.Communications | |||
249 | UserProfileData profileData = m_userService.GetUserProfile(uuid); | 249 | UserProfileData profileData = m_userService.GetUserProfile(uuid); |
250 | if (profileData != null) | 250 | if (profileData != null) |
251 | { | 251 | { |
252 | LLUUID profileId = profileData.UUID; | 252 | LLUUID profileId = profileData.Id; |
253 | string firstname = profileData.username; | 253 | string firstname = profileData.FirstName; |
254 | string lastname = profileData.surname; | 254 | string lastname = profileData.SurName; |
255 | 255 | ||
256 | remote_client.SendNameReply(profileId, firstname, lastname); | 256 | remote_client.SendNameReply(profileId, firstname, lastname); |
257 | } | 257 | } |
diff --git a/OpenSim/Framework/Communications/LoginService.cs b/OpenSim/Framework/Communications/LoginService.cs index 6f558a0..e5ad7a0 100644 --- a/OpenSim/Framework/Communications/LoginService.cs +++ b/OpenSim/Framework/Communications/LoginService.cs | |||
@@ -184,13 +184,13 @@ namespace OpenSim.Framework.UserManagement | |||
184 | else | 184 | else |
185 | { | 185 | { |
186 | // If we already have a session... | 186 | // If we already have a session... |
187 | if (userProfile.currentAgent != null && userProfile.currentAgent.agentOnline) | 187 | if (userProfile.CurrentAgent != null && userProfile.CurrentAgent.agentOnline) |
188 | { | 188 | { |
189 | //TODO: The following statements can cause trouble: | 189 | //TODO: The following statements can cause trouble: |
190 | // If agentOnline could not turn from true back to false normally | 190 | // If agentOnline could not turn from true back to false normally |
191 | // because of some problem, for instance, the crashment of server or client, | 191 | // because of some problem, for instance, the crashment of server or client, |
192 | // the user cannot log in any longer. | 192 | // the user cannot log in any longer. |
193 | userProfile.currentAgent.agentOnline = false; | 193 | userProfile.CurrentAgent.agentOnline = false; |
194 | m_userManager.CommitAgent(ref userProfile); | 194 | m_userManager.CommitAgent(ref userProfile); |
195 | 195 | ||
196 | // Reject the login | 196 | // Reject the login |
@@ -207,7 +207,7 @@ namespace OpenSim.Framework.UserManagement | |||
207 | 207 | ||
208 | try | 208 | try |
209 | { | 209 | { |
210 | LLUUID agentID = userProfile.UUID; | 210 | LLUUID agentID = userProfile.Id; |
211 | 211 | ||
212 | // Inventory Library Section | 212 | // Inventory Library Section |
213 | InventoryData inventData = GetInventorySkeleton(agentID); | 213 | InventoryData inventData = GetInventorySkeleton(agentID); |
@@ -217,16 +217,16 @@ namespace OpenSim.Framework.UserManagement | |||
217 | InventoryRootHash["folder_id"] = inventData.RootFolderID.ToString(); | 217 | InventoryRootHash["folder_id"] = inventData.RootFolderID.ToString(); |
218 | ArrayList InventoryRoot = new ArrayList(); | 218 | ArrayList InventoryRoot = new ArrayList(); |
219 | InventoryRoot.Add(InventoryRootHash); | 219 | InventoryRoot.Add(InventoryRootHash); |
220 | userProfile.rootInventoryFolderID = inventData.RootFolderID; | 220 | userProfile.RootInventoryFolderID = inventData.RootFolderID; |
221 | 221 | ||
222 | // Circuit Code | 222 | // Circuit Code |
223 | uint circode = (uint) (Util.RandomClass.Next()); | 223 | uint circode = (uint) (Util.RandomClass.Next()); |
224 | 224 | ||
225 | logResponse.Lastname = userProfile.surname; | 225 | logResponse.Lastname = userProfile.SurName; |
226 | logResponse.Firstname = userProfile.username; | 226 | logResponse.Firstname = userProfile.FirstName; |
227 | logResponse.AgentID = agentID.ToString(); | 227 | logResponse.AgentID = agentID.ToString(); |
228 | logResponse.SessionID = userProfile.currentAgent.sessionID.ToString(); | 228 | logResponse.SessionID = userProfile.CurrentAgent.sessionID.ToString(); |
229 | logResponse.SecureSessionID = userProfile.currentAgent.secureSessionID.ToString(); | 229 | logResponse.SecureSessionID = userProfile.CurrentAgent.secureSessionID.ToString(); |
230 | logResponse.InventoryRoot = InventoryRoot; | 230 | logResponse.InventoryRoot = InventoryRoot; |
231 | logResponse.InventorySkeleton = AgentInventoryArray; | 231 | logResponse.InventorySkeleton = AgentInventoryArray; |
232 | logResponse.InventoryLibrary = GetInventoryLibrary(); | 232 | logResponse.InventoryLibrary = GetInventoryLibrary(); |
@@ -334,9 +334,9 @@ namespace OpenSim.Framework.UserManagement | |||
334 | else | 334 | else |
335 | { | 335 | { |
336 | // If we already have a session... | 336 | // If we already have a session... |
337 | if (userProfile.currentAgent != null && userProfile.currentAgent.agentOnline) | 337 | if (userProfile.CurrentAgent != null && userProfile.CurrentAgent.agentOnline) |
338 | { | 338 | { |
339 | userProfile.currentAgent = null; | 339 | userProfile.CurrentAgent = null; |
340 | m_userManager.CommitAgent(ref userProfile); | 340 | m_userManager.CommitAgent(ref userProfile); |
341 | 341 | ||
342 | // Reject the login | 342 | // Reject the login |
@@ -349,7 +349,7 @@ namespace OpenSim.Framework.UserManagement | |||
349 | 349 | ||
350 | try | 350 | try |
351 | { | 351 | { |
352 | LLUUID agentID = userProfile.UUID; | 352 | LLUUID agentID = userProfile.Id; |
353 | 353 | ||
354 | // Inventory Library Section | 354 | // Inventory Library Section |
355 | InventoryData inventData = GetInventorySkeleton(agentID); | 355 | InventoryData inventData = GetInventorySkeleton(agentID); |
@@ -359,16 +359,16 @@ namespace OpenSim.Framework.UserManagement | |||
359 | InventoryRootHash["folder_id"] = inventData.RootFolderID.ToString(); | 359 | InventoryRootHash["folder_id"] = inventData.RootFolderID.ToString(); |
360 | ArrayList InventoryRoot = new ArrayList(); | 360 | ArrayList InventoryRoot = new ArrayList(); |
361 | InventoryRoot.Add(InventoryRootHash); | 361 | InventoryRoot.Add(InventoryRootHash); |
362 | userProfile.rootInventoryFolderID = inventData.RootFolderID; | 362 | userProfile.RootInventoryFolderID = inventData.RootFolderID; |
363 | 363 | ||
364 | // Circuit Code | 364 | // Circuit Code |
365 | uint circode = (uint)(Util.RandomClass.Next()); | 365 | uint circode = (uint)(Util.RandomClass.Next()); |
366 | 366 | ||
367 | logResponse.Lastname = userProfile.surname; | 367 | logResponse.Lastname = userProfile.SurName; |
368 | logResponse.Firstname = userProfile.username; | 368 | logResponse.Firstname = userProfile.FirstName; |
369 | logResponse.AgentID = agentID.ToString(); | 369 | logResponse.AgentID = agentID.ToString(); |
370 | logResponse.SessionID = userProfile.currentAgent.sessionID.ToString(); | 370 | logResponse.SessionID = userProfile.CurrentAgent.sessionID.ToString(); |
371 | logResponse.SecureSessionID = userProfile.currentAgent.secureSessionID.ToString(); | 371 | logResponse.SecureSessionID = userProfile.CurrentAgent.secureSessionID.ToString(); |
372 | logResponse.InventoryRoot = InventoryRoot; | 372 | logResponse.InventoryRoot = InventoryRoot; |
373 | logResponse.InventorySkeleton = AgentInventoryArray; | 373 | logResponse.InventorySkeleton = AgentInventoryArray; |
374 | logResponse.InventoryLibrary = GetInventoryLibrary(); | 374 | logResponse.InventoryLibrary = GetInventoryLibrary(); |
@@ -491,7 +491,7 @@ namespace OpenSim.Framework.UserManagement | |||
491 | if (goodweblogin) | 491 | if (goodweblogin) |
492 | { | 492 | { |
493 | LLUUID webloginkey = LLUUID.Random(); | 493 | LLUUID webloginkey = LLUUID.Random(); |
494 | m_userManager.StoreWebLoginKey(user.UUID, webloginkey); | 494 | m_userManager.StoreWebLoginKey(user.Id, webloginkey); |
495 | statuscode = 301; | 495 | statuscode = 301; |
496 | 496 | ||
497 | string redirectURL = "about:blank?redirect-http-hack=" + | 497 | string redirectURL = "about:blank?redirect-http-hack=" + |
@@ -639,7 +639,7 @@ namespace OpenSim.Framework.UserManagement | |||
639 | public virtual bool AuthenticateUser(UserProfileData profile, string password) | 639 | public virtual bool AuthenticateUser(UserProfileData profile, string password) |
640 | { | 640 | { |
641 | bool passwordSuccess = false; | 641 | bool passwordSuccess = false; |
642 | m_log.InfoFormat("[LOGIN]: Authenticating {0} {1} ({2})", profile.username, profile.surname, profile.UUID); | 642 | m_log.InfoFormat("[LOGIN]: Authenticating {0} {1} ({2})", profile.FirstName, profile.SurName, profile.Id); |
643 | 643 | ||
644 | // Web Login method seems to also occasionally send the hashed password itself | 644 | // Web Login method seems to also occasionally send the hashed password itself |
645 | 645 | ||
@@ -650,13 +650,13 @@ namespace OpenSim.Framework.UserManagement | |||
650 | 650 | ||
651 | password = password.Remove(0, 3); //remove $1$ | 651 | password = password.Remove(0, 3); //remove $1$ |
652 | 652 | ||
653 | string s = Util.Md5Hash(password + ":" + profile.passwordSalt); | 653 | string s = Util.Md5Hash(password + ":" + profile.PasswordSalt); |
654 | // Testing... | 654 | // Testing... |
655 | //m_log.Info("[LOGIN]: SubHash:" + s + " userprofile:" + profile.passwordHash); | 655 | //m_log.Info("[LOGIN]: SubHash:" + s + " userprofile:" + profile.passwordHash); |
656 | //m_log.Info("[LOGIN]: userprofile:" + profile.passwordHash + " SubCT:" + password); | 656 | //m_log.Info("[LOGIN]: userprofile:" + profile.passwordHash + " SubCT:" + password); |
657 | 657 | ||
658 | passwordSuccess = (profile.passwordHash.Equals(s.ToString(), StringComparison.InvariantCultureIgnoreCase) | 658 | passwordSuccess = (profile.PasswordHash.Equals(s.ToString(), StringComparison.InvariantCultureIgnoreCase) |
659 | || profile.passwordHash.Equals(password, StringComparison.InvariantCultureIgnoreCase)); | 659 | || profile.PasswordHash.Equals(password, StringComparison.InvariantCultureIgnoreCase)); |
660 | 660 | ||
661 | return passwordSuccess; | 661 | return passwordSuccess; |
662 | } | 662 | } |
@@ -664,10 +664,10 @@ namespace OpenSim.Framework.UserManagement | |||
664 | public virtual bool AuthenticateUser(UserProfileData profile, LLUUID webloginkey) | 664 | public virtual bool AuthenticateUser(UserProfileData profile, LLUUID webloginkey) |
665 | { | 665 | { |
666 | bool passwordSuccess = false; | 666 | bool passwordSuccess = false; |
667 | m_log.InfoFormat("[LOGIN]: Authenticating {0} {1} ({2})", profile.username, profile.surname, profile.UUID); | 667 | m_log.InfoFormat("[LOGIN]: Authenticating {0} {1} ({2})", profile.FirstName, profile.SurName, profile.Id); |
668 | 668 | ||
669 | // Match web login key unless it's the default weblogin key LLUUID.Zero | 669 | // Match web login key unless it's the default weblogin key LLUUID.Zero |
670 | passwordSuccess = ((profile.webLoginKey==webloginkey) && profile.webLoginKey != LLUUID.Zero); | 670 | passwordSuccess = ((profile.WebLoginKey==webloginkey) && profile.WebLoginKey != LLUUID.Zero); |
671 | 671 | ||
672 | return passwordSuccess; | 672 | return passwordSuccess; |
673 | } | 673 | } |
diff --git a/OpenSim/Framework/Communications/UserManagerBase.cs b/OpenSim/Framework/Communications/UserManagerBase.cs index 332583c..02be6bd 100644 --- a/OpenSim/Framework/Communications/UserManagerBase.cs +++ b/OpenSim/Framework/Communications/UserManagerBase.cs | |||
@@ -96,7 +96,7 @@ namespace OpenSim.Framework.UserManagement | |||
96 | 96 | ||
97 | if (profile != null) | 97 | if (profile != null) |
98 | { | 98 | { |
99 | profile.currentAgent = getUserAgent(profile.UUID); | 99 | profile.CurrentAgent = getUserAgent(profile.Id); |
100 | return profile; | 100 | return profile; |
101 | } | 101 | } |
102 | } | 102 | } |
@@ -113,7 +113,7 @@ namespace OpenSim.Framework.UserManagement | |||
113 | 113 | ||
114 | if (null != profile) | 114 | if (null != profile) |
115 | { | 115 | { |
116 | profile.currentAgent = getUserAgent(profile.UUID); | 116 | profile.CurrentAgent = getUserAgent(profile.Id); |
117 | return profile; | 117 | return profile; |
118 | } | 118 | } |
119 | } | 119 | } |
@@ -298,7 +298,7 @@ namespace OpenSim.Framework.UserManagement | |||
298 | public void clearUserAgent(LLUUID agentID) | 298 | public void clearUserAgent(LLUUID agentID) |
299 | { | 299 | { |
300 | UserProfileData profile = GetUserProfile(agentID); | 300 | UserProfileData profile = GetUserProfile(agentID); |
301 | profile.currentAgent = null; | 301 | profile.CurrentAgent = null; |
302 | 302 | ||
303 | setUserProfile(profile); | 303 | setUserProfile(profile); |
304 | } | 304 | } |
@@ -355,28 +355,28 @@ namespace OpenSim.Framework.UserManagement | |||
355 | agent.sessionID = new LLUUID(randDataS, 0); | 355 | agent.sessionID = new LLUUID(randDataS, 0); |
356 | 356 | ||
357 | // Profile UUID | 357 | // Profile UUID |
358 | agent.UUID = profile.UUID; | 358 | agent.UUID = profile.Id; |
359 | 359 | ||
360 | // Current position (from Home) | 360 | // Current position (from Home) |
361 | agent.currentHandle = profile.homeRegion; | 361 | agent.currentHandle = profile.HomeRegion; |
362 | agent.currentPos = profile.homeLocation; | 362 | agent.currentPos = profile.HomeLocation; |
363 | 363 | ||
364 | // If user specified additional start, use that | 364 | // If user specified additional start, use that |
365 | if (requestData.ContainsKey("start")) | 365 | if (requestData.ContainsKey("start")) |
366 | { | 366 | { |
367 | string startLoc = ((string)requestData["start"]).Trim(); | 367 | string startLoc = ((string)requestData["start"]).Trim(); |
368 | if (("last" == startLoc) && (profile.currentAgent != null)) | 368 | if (("last" == startLoc) && (profile.CurrentAgent != null)) |
369 | { | 369 | { |
370 | if ((profile.currentAgent.currentPos.X > 0) | 370 | if ((profile.CurrentAgent.currentPos.X > 0) |
371 | && (profile.currentAgent.currentPos.Y > 0) | 371 | && (profile.CurrentAgent.currentPos.Y > 0) |
372 | && (profile.currentAgent.currentPos.Z > 0) | 372 | && (profile.CurrentAgent.currentPos.Z > 0) |
373 | ) | 373 | ) |
374 | { | 374 | { |
375 | // TODO: Right now, currentRegion has not been used in GridServer for requesting region. | 375 | // TODO: Right now, currentRegion has not been used in GridServer for requesting region. |
376 | // TODO: It is only using currentHandle. | 376 | // TODO: It is only using currentHandle. |
377 | agent.currentRegion = profile.currentAgent.currentRegion; | 377 | agent.currentRegion = profile.CurrentAgent.currentRegion; |
378 | agent.currentHandle = profile.currentAgent.currentHandle; | 378 | agent.currentHandle = profile.CurrentAgent.currentHandle; |
379 | agent.currentPos = profile.currentAgent.currentPos; | 379 | agent.currentPos = profile.CurrentAgent.currentPos; |
380 | } | 380 | } |
381 | } | 381 | } |
382 | 382 | ||
@@ -406,7 +406,7 @@ namespace OpenSim.Framework.UserManagement | |||
406 | agent.regionID = LLUUID.Zero; // Fill in later | 406 | agent.regionID = LLUUID.Zero; // Fill in later |
407 | agent.currentRegion = LLUUID.Zero; // Fill in later | 407 | agent.currentRegion = LLUUID.Zero; // Fill in later |
408 | 408 | ||
409 | profile.currentAgent = agent; | 409 | profile.CurrentAgent = agent; |
410 | } | 410 | } |
411 | 411 | ||
412 | /// <summary> | 412 | /// <summary> |
@@ -432,9 +432,9 @@ namespace OpenSim.Framework.UserManagement | |||
432 | if (userProfile != null) | 432 | if (userProfile != null) |
433 | { | 433 | { |
434 | // This line needs to be in side the above if statement or the UserServer will crash on some logouts. | 434 | // This line needs to be in side the above if statement or the UserServer will crash on some logouts. |
435 | m_log.Info("[LOGOUT]: " + userProfile.username + " " + userProfile.surname + " from " + regionhandle + "(" + posx + "," + posy + "," + posz + ")"); | 435 | m_log.Info("[LOGOUT]: " + userProfile.FirstName + " " + userProfile.SurName + " from " + regionhandle + "(" + posx + "," + posy + "," + posz + ")"); |
436 | 436 | ||
437 | userAgent = userProfile.currentAgent; | 437 | userAgent = userProfile.CurrentAgent; |
438 | if (userAgent != null) | 438 | if (userAgent != null) |
439 | { | 439 | { |
440 | userAgent.agentOnline = false; | 440 | userAgent.agentOnline = false; |
@@ -447,7 +447,7 @@ namespace OpenSim.Framework.UserManagement | |||
447 | 447 | ||
448 | userAgent.currentHandle = regionhandle; | 448 | userAgent.currentHandle = regionhandle; |
449 | userAgent.currentPos = currentPos; | 449 | userAgent.currentPos = currentPos; |
450 | userProfile.currentAgent = userAgent; | 450 | userProfile.CurrentAgent = userAgent; |
451 | 451 | ||
452 | CommitAgent(ref userProfile); | 452 | CommitAgent(ref userProfile); |
453 | } | 453 | } |
@@ -481,11 +481,11 @@ namespace OpenSim.Framework.UserManagement | |||
481 | agent.sessionID = new LLUUID(randDataS, 0); | 481 | agent.sessionID = new LLUUID(randDataS, 0); |
482 | 482 | ||
483 | // Profile UUID | 483 | // Profile UUID |
484 | agent.UUID = profile.UUID; | 484 | agent.UUID = profile.Id; |
485 | 485 | ||
486 | // Current position (from Home) | 486 | // Current position (from Home) |
487 | agent.currentHandle = profile.homeRegion; | 487 | agent.currentHandle = profile.HomeRegion; |
488 | agent.currentPos = profile.homeLocation; | 488 | agent.currentPos = profile.HomeLocation; |
489 | 489 | ||
490 | // What time did the user login? | 490 | // What time did the user login? |
491 | agent.loginTime = Util.UnixTimeSinceEpoch(); | 491 | agent.loginTime = Util.UnixTimeSinceEpoch(); |
@@ -495,7 +495,7 @@ namespace OpenSim.Framework.UserManagement | |||
495 | agent.regionID = LLUUID.Zero; // Fill in later | 495 | agent.regionID = LLUUID.Zero; // Fill in later |
496 | agent.currentRegion = LLUUID.Zero; // Fill in later | 496 | agent.currentRegion = LLUUID.Zero; // Fill in later |
497 | 497 | ||
498 | profile.currentAgent = agent; | 498 | profile.CurrentAgent = agent; |
499 | } | 499 | } |
500 | 500 | ||
501 | /// <summary> | 501 | /// <summary> |
@@ -508,7 +508,7 @@ namespace OpenSim.Framework.UserManagement | |||
508 | // TODO: how is this function different from setUserProfile? -> Add AddUserAgent() here and commit both tables "users" and "agents" | 508 | // TODO: how is this function different from setUserProfile? -> Add AddUserAgent() here and commit both tables "users" and "agents" |
509 | // TODO: what is the logic should be? | 509 | // TODO: what is the logic should be? |
510 | bool ret = false; | 510 | bool ret = false; |
511 | ret = AddUserAgent(profile.currentAgent); | 511 | ret = AddUserAgent(profile.CurrentAgent); |
512 | ret = ret & setUserProfile(profile); | 512 | ret = ret & setUserProfile(profile); |
513 | return ret; | 513 | return ret; |
514 | } | 514 | } |
@@ -522,16 +522,16 @@ namespace OpenSim.Framework.UserManagement | |||
522 | public LLUUID AddUserProfile(string firstName, string lastName, string pass, uint regX, uint regY) | 522 | public LLUUID AddUserProfile(string firstName, string lastName, string pass, uint regX, uint regY) |
523 | { | 523 | { |
524 | UserProfileData user = new UserProfileData(); | 524 | UserProfileData user = new UserProfileData(); |
525 | user.homeLocation = new LLVector3(128, 128, 100); | 525 | user.HomeLocation = new LLVector3(128, 128, 100); |
526 | user.UUID = LLUUID.Random(); | 526 | user.Id = LLUUID.Random(); |
527 | user.username = firstName; | 527 | user.FirstName = firstName; |
528 | user.surname = lastName; | 528 | user.SurName = lastName; |
529 | user.passwordHash = pass; | 529 | user.PasswordHash = pass; |
530 | user.passwordSalt = String.Empty; | 530 | user.PasswordSalt = String.Empty; |
531 | user.created = Util.UnixTimeSinceEpoch(); | 531 | user.Created = Util.UnixTimeSinceEpoch(); |
532 | user.homeLookAt = new LLVector3(100, 100, 100); | 532 | user.HomeLookAt = new LLVector3(100, 100, 100); |
533 | user.homeRegionX = regX; | 533 | user.HomeRegionX = regX; |
534 | user.homeRegionY = regY; | 534 | user.HomeRegionY = regY; |
535 | 535 | ||
536 | foreach (KeyValuePair<string, IUserData> plugin in _plugins) | 536 | foreach (KeyValuePair<string, IUserData> plugin in _plugins) |
537 | { | 537 | { |
@@ -545,14 +545,14 @@ namespace OpenSim.Framework.UserManagement | |||
545 | } | 545 | } |
546 | } | 546 | } |
547 | 547 | ||
548 | return user.UUID; | 548 | return user.Id; |
549 | } | 549 | } |
550 | 550 | ||
551 | public bool UpdateUserProfileProperties(UserProfileData UserProfile) | 551 | public bool UpdateUserProfileProperties(UserProfileData UserProfile) |
552 | { | 552 | { |
553 | if (null == GetUserProfile(UserProfile.UUID)) | 553 | if (null == GetUserProfile(UserProfile.Id)) |
554 | { | 554 | { |
555 | m_log.Info("[USERSTORAGE]: Failed to find User by UUID " + UserProfile.UUID.ToString()); | 555 | m_log.Info("[USERSTORAGE]: Failed to find User by UUID " + UserProfile.Id.ToString()); |
556 | return false; | 556 | return false; |
557 | } | 557 | } |
558 | foreach (KeyValuePair<string, IUserData> plugin in _plugins) | 558 | foreach (KeyValuePair<string, IUserData> plugin in _plugins) |
@@ -563,7 +563,7 @@ namespace OpenSim.Framework.UserManagement | |||
563 | } | 563 | } |
564 | catch (Exception e) | 564 | catch (Exception e) |
565 | { | 565 | { |
566 | m_log.Info("[USERSTORAGE]: Unable to update user " + UserProfile.UUID.ToString() | 566 | m_log.Info("[USERSTORAGE]: Unable to update user " + UserProfile.Id.ToString() |
567 | + " via " + plugin.Key + "(" + e.ToString() + ")"); | 567 | + " via " + plugin.Key + "(" + e.ToString() + ")"); |
568 | return false; | 568 | return false; |
569 | } | 569 | } |
diff --git a/OpenSim/Framework/UserProfileData.cs b/OpenSim/Framework/UserProfileData.cs index 6a49f0d..016dc8d 100644 --- a/OpenSim/Framework/UserProfileData.cs +++ b/OpenSim/Framework/UserProfileData.cs | |||
@@ -38,37 +38,37 @@ namespace OpenSim.Framework | |||
38 | /// <summary> | 38 | /// <summary> |
39 | /// The ID value for this user | 39 | /// The ID value for this user |
40 | /// </summary> | 40 | /// </summary> |
41 | public LLUUID UUID; | 41 | private LLUUID _id; |
42 | 42 | ||
43 | /// <summary> | 43 | /// <summary> |
44 | /// The last used Web_login_key | 44 | /// The last used Web_login_key |
45 | /// </summary> | 45 | /// </summary> |
46 | public LLUUID webLoginKey; | 46 | private LLUUID webLoginKey; |
47 | /// <summary> | 47 | /// <summary> |
48 | /// The first component of a users account name | 48 | /// The first component of a users account name |
49 | /// </summary> | 49 | /// </summary> |
50 | public string username; | 50 | private string username; |
51 | 51 | ||
52 | /// <summary> | 52 | /// <summary> |
53 | /// The second component of a users account name | 53 | /// The second component of a users account name |
54 | /// </summary> | 54 | /// </summary> |
55 | public string surname; | 55 | private string surname; |
56 | 56 | ||
57 | /// <summary> | 57 | /// <summary> |
58 | /// A salted hash containing the users password, in the format md5(md5(password) + ":" + salt) | 58 | /// A salted hash containing the users password, in the format md5(md5(password) + ":" + salt) |
59 | /// </summary> | 59 | /// </summary> |
60 | /// <remarks>This is double MD5'd because the client sends an unsalted MD5 to the loginserver</remarks> | 60 | /// <remarks>This is double MD5'd because the client sends an unsalted MD5 to the loginserver</remarks> |
61 | public string passwordHash; | 61 | private string passwordHash; |
62 | 62 | ||
63 | /// <summary> | 63 | /// <summary> |
64 | /// The salt used for the users hash, should be 32 bytes or longer | 64 | /// The salt used for the users hash, should be 32 bytes or longer |
65 | /// </summary> | 65 | /// </summary> |
66 | public string passwordSalt; | 66 | private string passwordSalt; |
67 | 67 | ||
68 | /// <summary> | 68 | /// <summary> |
69 | /// 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 | 69 | /// 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 |
70 | /// </summary> | 70 | /// </summary> |
71 | public ulong homeRegion | 71 | public ulong HomeRegion |
72 | { | 72 | { |
73 | get { return Helpers.UIntsToLong((homeRegionX * (uint)Constants.RegionSize), (homeRegionY * (uint)Constants.RegionSize)); } | 73 | get { return Helpers.UIntsToLong((homeRegionX * (uint)Constants.RegionSize), (homeRegionY * (uint)Constants.RegionSize)); } |
74 | set | 74 | set |
@@ -78,74 +78,272 @@ namespace OpenSim.Framework | |||
78 | } | 78 | } |
79 | } | 79 | } |
80 | 80 | ||
81 | public uint homeRegionX; | 81 | public LLUUID Id { |
82 | public uint homeRegionY; | 82 | get { |
83 | return _id; | ||
84 | } | ||
85 | set { | ||
86 | _id = value; | ||
87 | } | ||
88 | } | ||
89 | |||
90 | public LLUUID WebLoginKey { | ||
91 | get { | ||
92 | return webLoginKey; | ||
93 | } | ||
94 | set { | ||
95 | webLoginKey = value; | ||
96 | } | ||
97 | } | ||
98 | |||
99 | public string FirstName { | ||
100 | get { | ||
101 | return username; | ||
102 | } | ||
103 | set { | ||
104 | username = value; | ||
105 | } | ||
106 | } | ||
107 | |||
108 | public string SurName { | ||
109 | get { | ||
110 | return surname; | ||
111 | } | ||
112 | set { | ||
113 | surname = value; | ||
114 | } | ||
115 | } | ||
116 | |||
117 | public string PasswordHash { | ||
118 | get { | ||
119 | return passwordHash; | ||
120 | } | ||
121 | set { | ||
122 | passwordHash = value; | ||
123 | } | ||
124 | } | ||
125 | |||
126 | public string PasswordSalt { | ||
127 | get { | ||
128 | return passwordSalt; | ||
129 | } | ||
130 | set { | ||
131 | passwordSalt = value; | ||
132 | } | ||
133 | } | ||
134 | |||
135 | public uint HomeRegionX { | ||
136 | get { | ||
137 | return homeRegionX; | ||
138 | } | ||
139 | set { | ||
140 | homeRegionX = value; | ||
141 | } | ||
142 | } | ||
143 | |||
144 | public uint HomeRegionY { | ||
145 | get { | ||
146 | return homeRegionY; | ||
147 | } | ||
148 | set { | ||
149 | homeRegionY = value; | ||
150 | } | ||
151 | } | ||
152 | |||
153 | public LLVector3 HomeLocation { | ||
154 | get { | ||
155 | return homeLocation; | ||
156 | } | ||
157 | set { | ||
158 | homeLocation = value; | ||
159 | } | ||
160 | } | ||
161 | |||
162 | public LLVector3 HomeLookAt { | ||
163 | get { | ||
164 | return homeLookAt; | ||
165 | } | ||
166 | set { | ||
167 | homeLookAt = value; | ||
168 | } | ||
169 | } | ||
170 | |||
171 | public int Created { | ||
172 | get { | ||
173 | return created; | ||
174 | } | ||
175 | set { | ||
176 | created = value; | ||
177 | } | ||
178 | } | ||
179 | |||
180 | public int LastLogin { | ||
181 | get { | ||
182 | return lastLogin; | ||
183 | } | ||
184 | set { | ||
185 | lastLogin = value; | ||
186 | } | ||
187 | } | ||
188 | |||
189 | public LLUUID RootInventoryFolderID { | ||
190 | get { | ||
191 | return rootInventoryFolderID; | ||
192 | } | ||
193 | set { | ||
194 | rootInventoryFolderID = value; | ||
195 | } | ||
196 | } | ||
197 | |||
198 | public string UserInventoryURI { | ||
199 | get { | ||
200 | return userInventoryURI; | ||
201 | } | ||
202 | set { | ||
203 | userInventoryURI = value; | ||
204 | } | ||
205 | } | ||
206 | |||
207 | public string UserAssetURI { | ||
208 | get { | ||
209 | return userAssetURI; | ||
210 | } | ||
211 | set { | ||
212 | userAssetURI = value; | ||
213 | } | ||
214 | } | ||
215 | |||
216 | public uint ProfileCanDoMask { | ||
217 | get { | ||
218 | return profileCanDoMask; | ||
219 | } | ||
220 | set { | ||
221 | profileCanDoMask = value; | ||
222 | } | ||
223 | } | ||
224 | |||
225 | public uint ProfileWantDoMask { | ||
226 | get { | ||
227 | return profileWantDoMask; | ||
228 | } | ||
229 | set { | ||
230 | profileWantDoMask = value; | ||
231 | } | ||
232 | } | ||
233 | |||
234 | public string ProfileAboutText { | ||
235 | get { | ||
236 | return profileAboutText; | ||
237 | } | ||
238 | set { | ||
239 | profileAboutText = value; | ||
240 | } | ||
241 | } | ||
242 | |||
243 | public string ProfileFirstText { | ||
244 | get { | ||
245 | return profileFirstText; | ||
246 | } | ||
247 | set { | ||
248 | profileFirstText = value; | ||
249 | } | ||
250 | } | ||
251 | |||
252 | public LLUUID ProfileImage { | ||
253 | get { | ||
254 | return profileImage; | ||
255 | } | ||
256 | set { | ||
257 | profileImage = value; | ||
258 | } | ||
259 | } | ||
260 | |||
261 | public LLUUID ProfileFirstImage { | ||
262 | get { | ||
263 | return profileFirstImage; | ||
264 | } | ||
265 | set { | ||
266 | profileFirstImage = value; | ||
267 | } | ||
268 | } | ||
269 | |||
270 | public UserAgentData CurrentAgent { | ||
271 | get { | ||
272 | return currentAgent; | ||
273 | } | ||
274 | set { | ||
275 | currentAgent = value; | ||
276 | } | ||
277 | } | ||
278 | |||
279 | private uint homeRegionX; | ||
280 | private uint homeRegionY; | ||
83 | 281 | ||
84 | /// <summary> | 282 | /// <summary> |
85 | /// The coordinates inside the region of the home location | 283 | /// The coordinates inside the region of the home location |
86 | /// </summary> | 284 | /// </summary> |
87 | public LLVector3 homeLocation; | 285 | private LLVector3 homeLocation; |
88 | 286 | ||
89 | /// <summary> | 287 | /// <summary> |
90 | /// Where the user will be looking when they rez. | 288 | /// Where the user will be looking when they rez. |
91 | /// </summary> | 289 | /// </summary> |
92 | public LLVector3 homeLookAt; | 290 | private LLVector3 homeLookAt; |
93 | 291 | ||
94 | /// <summary> | 292 | /// <summary> |
95 | /// A UNIX Timestamp (seconds since epoch) for the users creation | 293 | /// A UNIX Timestamp (seconds since epoch) for the users creation |
96 | /// </summary> | 294 | /// </summary> |
97 | public int created; | 295 | private int created; |
98 | 296 | ||
99 | /// <summary> | 297 | /// <summary> |
100 | /// A UNIX Timestamp for the users last login date / time | 298 | /// A UNIX Timestamp for the users last login date / time |
101 | /// </summary> | 299 | /// </summary> |
102 | public int lastLogin; | 300 | private int lastLogin; |
103 | 301 | ||
104 | public LLUUID rootInventoryFolderID; | 302 | private LLUUID rootInventoryFolderID; |
105 | 303 | ||
106 | /// <summary> | 304 | /// <summary> |
107 | /// A URI to the users inventory server, used for foreigners and large grids | 305 | /// A URI to the users inventory server, used for foreigners and large grids |
108 | /// </summary> | 306 | /// </summary> |
109 | public string userInventoryURI = String.Empty; | 307 | private string userInventoryURI = String.Empty; |
110 | 308 | ||
111 | /// <summary> | 309 | /// <summary> |
112 | /// A URI to the users asset server, used for foreigners and large grids. | 310 | /// A URI to the users asset server, used for foreigners and large grids. |
113 | /// </summary> | 311 | /// </summary> |
114 | public string userAssetURI = String.Empty; | 312 | private string userAssetURI = String.Empty; |
115 | 313 | ||
116 | /// <summary> | 314 | /// <summary> |
117 | /// A uint mask containing the "I can do" fields of the users profile | 315 | /// A uint mask containing the "I can do" fields of the users profile |
118 | /// </summary> | 316 | /// </summary> |
119 | public uint profileCanDoMask; | 317 | private uint profileCanDoMask; |
120 | 318 | ||
121 | /// <summary> | 319 | /// <summary> |
122 | /// A uint mask containing the "I want to do" part of the users profile | 320 | /// A uint mask containing the "I want to do" part of the users profile |
123 | /// </summary> | 321 | /// </summary> |
124 | public uint profileWantDoMask; // Profile window "I want to" mask | 322 | private uint profileWantDoMask; // Profile window "I want to" mask |
125 | 323 | ||
126 | /// <summary> | 324 | /// <summary> |
127 | /// The about text listed in a users profile. | 325 | /// The about text listed in a users profile. |
128 | /// </summary> | 326 | /// </summary> |
129 | public string profileAboutText = String.Empty; | 327 | private string profileAboutText = String.Empty; |
130 | 328 | ||
131 | /// <summary> | 329 | /// <summary> |
132 | /// The first life about text listed in a users profile | 330 | /// The first life about text listed in a users profile |
133 | /// </summary> | 331 | /// </summary> |
134 | public string profileFirstText = String.Empty; | 332 | private string profileFirstText = String.Empty; |
135 | 333 | ||
136 | /// <summary> | 334 | /// <summary> |
137 | /// The profile image for an avatar stored on the asset server | 335 | /// The profile image for an avatar stored on the asset server |
138 | /// </summary> | 336 | /// </summary> |
139 | public LLUUID profileImage; | 337 | private LLUUID profileImage; |
140 | 338 | ||
141 | /// <summary> | 339 | /// <summary> |
142 | /// The profile image for the users first life tab | 340 | /// The profile image for the users first life tab |
143 | /// </summary> | 341 | /// </summary> |
144 | public LLUUID profileFirstImage; | 342 | private LLUUID profileFirstImage; |
145 | 343 | ||
146 | /// <summary> | 344 | /// <summary> |
147 | /// The users last registered agent (filled in on the user server) | 345 | /// The users last registered agent (filled in on the user server) |
148 | /// </summary> | 346 | /// </summary> |
149 | public UserAgentData currentAgent; | 347 | private UserAgentData currentAgent; |
150 | } | 348 | } |
151 | } | 349 | } |
diff --git a/OpenSim/Grid/UserServer/UserLoginService.cs b/OpenSim/Grid/UserServer/UserLoginService.cs index d409951..f655415 100644 --- a/OpenSim/Grid/UserServer/UserLoginService.cs +++ b/OpenSim/Grid/UserServer/UserLoginService.cs | |||
@@ -85,14 +85,14 @@ namespace OpenSim.Grid.UserServer | |||
85 | { | 85 | { |
86 | SimInfo = | 86 | SimInfo = |
87 | RegionProfileData.RequestSimProfileData( | 87 | RegionProfileData.RequestSimProfileData( |
88 | theUser.currentAgent.currentHandle, m_config.GridServerURL, | 88 | theUser.CurrentAgent.currentHandle, m_config.GridServerURL, |
89 | m_config.GridSendKey, m_config.GridRecvKey); | 89 | m_config.GridSendKey, m_config.GridRecvKey); |
90 | } | 90 | } |
91 | else if (startLocationRequest == "home") | 91 | else if (startLocationRequest == "home") |
92 | { | 92 | { |
93 | SimInfo = | 93 | SimInfo = |
94 | RegionProfileData.RequestSimProfileData( | 94 | RegionProfileData.RequestSimProfileData( |
95 | theUser.homeRegion, m_config.GridServerURL, | 95 | theUser.HomeRegion, m_config.GridServerURL, |
96 | m_config.GridSendKey, m_config.GridRecvKey); | 96 | m_config.GridSendKey, m_config.GridRecvKey); |
97 | } | 97 | } |
98 | else | 98 | else |
@@ -104,7 +104,7 @@ namespace OpenSim.Grid.UserServer | |||
104 | // TODO: Parse out startlocationrequest string in the format; 'uri:RegionName&X&Y&Z' | 104 | // TODO: Parse out startlocationrequest string in the format; 'uri:RegionName&X&Y&Z' |
105 | SimInfo = | 105 | SimInfo = |
106 | RegionProfileData.RequestSimProfileData( | 106 | RegionProfileData.RequestSimProfileData( |
107 | theUser.currentAgent.currentHandle, m_config.GridServerURL, | 107 | theUser.CurrentAgent.currentHandle, m_config.GridServerURL, |
108 | m_config.GridSendKey, m_config.GridRecvKey); | 108 | m_config.GridSendKey, m_config.GridRecvKey); |
109 | } | 109 | } |
110 | else | 110 | else |
@@ -120,7 +120,7 @@ namespace OpenSim.Grid.UserServer | |||
120 | m_log.Info("[LOGIN]: Didn't find region with a close name match sending to home location"); | 120 | m_log.Info("[LOGIN]: Didn't find region with a close name match sending to home location"); |
121 | SimInfo = | 121 | SimInfo = |
122 | RegionProfileData.RequestSimProfileData( | 122 | RegionProfileData.RequestSimProfileData( |
123 | theUser.homeRegion, m_config.GridServerURL, | 123 | theUser.HomeRegion, m_config.GridServerURL, |
124 | m_config.GridSendKey, m_config.GridRecvKey); | 124 | m_config.GridSendKey, m_config.GridRecvKey); |
125 | } else { | 125 | } else { |
126 | start_x = Convert.ToInt32(startLocationRequestParsed[1]); | 126 | start_x = Convert.ToInt32(startLocationRequestParsed[1]); |
@@ -135,10 +135,10 @@ namespace OpenSim.Grid.UserServer | |||
135 | //CFK: m_log.Info("[LOGIN]: Home Location"); | 135 | //CFK: m_log.Info("[LOGIN]: Home Location"); |
136 | response.Home = "{'region_handle':[r" + (SimInfo.regionLocX * Constants.RegionSize).ToString() + ",r" + | 136 | response.Home = "{'region_handle':[r" + (SimInfo.regionLocX * Constants.RegionSize).ToString() + ",r" + |
137 | (SimInfo.regionLocY * Constants.RegionSize).ToString() + "], " + | 137 | (SimInfo.regionLocY * Constants.RegionSize).ToString() + "], " + |
138 | "'position':[r" + theUser.homeLocation.X.ToString() + ",r" + | 138 | "'position':[r" + theUser.HomeLocation.X.ToString() + ",r" + |
139 | theUser.homeLocation.Y.ToString() + ",r" + theUser.homeLocation.Z.ToString() + "], " + | 139 | theUser.HomeLocation.Y.ToString() + ",r" + theUser.HomeLocation.Z.ToString() + "], " + |
140 | "'look_at':[r" + theUser.homeLocation.X.ToString() + ",r" + | 140 | "'look_at':[r" + theUser.HomeLocation.X.ToString() + ",r" + |
141 | theUser.homeLocation.Y.ToString() + ",r" + theUser.homeLocation.Z.ToString() + "]}"; | 141 | theUser.HomeLocation.Y.ToString() + ",r" + theUser.HomeLocation.Z.ToString() + "]}"; |
142 | 142 | ||
143 | // Destination | 143 | // Destination |
144 | //CFK: The "Notifying" message always seems to appear, so subsume the data from this message into | 144 | //CFK: The "Notifying" message always seems to appear, so subsume the data from this message into |
@@ -164,25 +164,25 @@ namespace OpenSim.Grid.UserServer | |||
164 | //CFK: m_log.Info("[LOGIN]: " + SimInfo.regionName + " (" + SimInfo.serverURI + ") " + | 164 | //CFK: m_log.Info("[LOGIN]: " + SimInfo.regionName + " (" + SimInfo.serverURI + ") " + |
165 | //CFK: SimInfo.regionLocX + "," + SimInfo.regionLocY); | 165 | //CFK: SimInfo.regionLocX + "," + SimInfo.regionLocY); |
166 | 166 | ||
167 | theUser.currentAgent.currentRegion = SimInfo.UUID; | 167 | theUser.CurrentAgent.currentRegion = SimInfo.UUID; |
168 | theUser.currentAgent.currentHandle = SimInfo.regionHandle; | 168 | theUser.CurrentAgent.currentHandle = SimInfo.regionHandle; |
169 | if (start_x >= 0 && start_y >= 0 && start_z >= 0) { | 169 | if (start_x >= 0 && start_y >= 0 && start_z >= 0) { |
170 | theUser.currentAgent.currentPos.X = start_x; | 170 | theUser.CurrentAgent.currentPos.X = start_x; |
171 | theUser.currentAgent.currentPos.Y = start_y; | 171 | theUser.CurrentAgent.currentPos.Y = start_y; |
172 | theUser.currentAgent.currentPos.Z = start_z; | 172 | theUser.CurrentAgent.currentPos.Z = start_z; |
173 | } | 173 | } |
174 | // Prepare notification | 174 | // Prepare notification |
175 | Hashtable SimParams = new Hashtable(); | 175 | Hashtable SimParams = new Hashtable(); |
176 | SimParams["session_id"] = theUser.currentAgent.sessionID.ToString(); | 176 | SimParams["session_id"] = theUser.CurrentAgent.sessionID.ToString(); |
177 | SimParams["secure_session_id"] = theUser.currentAgent.secureSessionID.ToString(); | 177 | SimParams["secure_session_id"] = theUser.CurrentAgent.secureSessionID.ToString(); |
178 | SimParams["firstname"] = theUser.username; | 178 | SimParams["firstname"] = theUser.FirstName; |
179 | SimParams["lastname"] = theUser.surname; | 179 | SimParams["lastname"] = theUser.SurName; |
180 | SimParams["agent_id"] = theUser.UUID.ToString(); | 180 | SimParams["agent_id"] = theUser.Id.ToString(); |
181 | SimParams["circuit_code"] = (Int32) Convert.ToUInt32(response.CircuitCode); | 181 | SimParams["circuit_code"] = (Int32) Convert.ToUInt32(response.CircuitCode); |
182 | SimParams["startpos_x"] = theUser.currentAgent.currentPos.X.ToString(); | 182 | SimParams["startpos_x"] = theUser.CurrentAgent.currentPos.X.ToString(); |
183 | SimParams["startpos_y"] = theUser.currentAgent.currentPos.Y.ToString(); | 183 | SimParams["startpos_y"] = theUser.CurrentAgent.currentPos.Y.ToString(); |
184 | SimParams["startpos_z"] = theUser.currentAgent.currentPos.Z.ToString(); | 184 | SimParams["startpos_z"] = theUser.CurrentAgent.currentPos.Z.ToString(); |
185 | SimParams["regionhandle"] = theUser.currentAgent.currentHandle.ToString(); | 185 | SimParams["regionhandle"] = theUser.CurrentAgent.currentHandle.ToString(); |
186 | SimParams["caps_path"] = capsPath; | 186 | SimParams["caps_path"] = capsPath; |
187 | ArrayList SendParams = new ArrayList(); | 187 | ArrayList SendParams = new ArrayList(); |
188 | SendParams.Add(SimParams); | 188 | SendParams.Add(SimParams); |
@@ -206,9 +206,9 @@ namespace OpenSim.Grid.UserServer | |||
206 | if (handlerUserLoggedInAtLocation != null) | 206 | if (handlerUserLoggedInAtLocation != null) |
207 | { | 207 | { |
208 | m_log.Info("[LOGIN]: Letting other objects know about login"); | 208 | m_log.Info("[LOGIN]: Letting other objects know about login"); |
209 | handlerUserLoggedInAtLocation(theUser.UUID, theUser.currentAgent.sessionID, theUser.currentAgent.currentRegion, | 209 | handlerUserLoggedInAtLocation(theUser.Id, theUser.CurrentAgent.sessionID, theUser.CurrentAgent.currentRegion, |
210 | theUser.currentAgent.currentHandle, theUser.currentAgent.currentPos.X,theUser.currentAgent.currentPos.Y,theUser.currentAgent.currentPos.Z, | 210 | theUser.CurrentAgent.currentHandle, theUser.CurrentAgent.currentPos.X,theUser.CurrentAgent.currentPos.Y,theUser.CurrentAgent.currentPos.Z, |
211 | theUser.username,theUser.surname); | 211 | theUser.FirstName,theUser.SurName); |
212 | } | 212 | } |
213 | } | 213 | } |
214 | catch (Exception) | 214 | catch (Exception) |
@@ -237,10 +237,10 @@ namespace OpenSim.Grid.UserServer | |||
237 | m_log.Info("[LOGIN]: Home Location"); | 237 | m_log.Info("[LOGIN]: Home Location"); |
238 | response.Home = "{'region_handle':[r" + (SimInfo.regionLocX * Constants.RegionSize).ToString() + ",r" + | 238 | response.Home = "{'region_handle':[r" + (SimInfo.regionLocX * Constants.RegionSize).ToString() + ",r" + |
239 | (SimInfo.regionLocY * Constants.RegionSize).ToString() + "], " + | 239 | (SimInfo.regionLocY * Constants.RegionSize).ToString() + "], " + |
240 | "'position':[r" + theUser.homeLocation.X.ToString() + ",r" + | 240 | "'position':[r" + theUser.HomeLocation.X.ToString() + ",r" + |
241 | theUser.homeLocation.Y.ToString() + ",r" + theUser.homeLocation.Z.ToString() + "], " + | 241 | theUser.HomeLocation.Y.ToString() + ",r" + theUser.HomeLocation.Z.ToString() + "], " + |
242 | "'look_at':[r" + theUser.homeLocation.X.ToString() + ",r" + | 242 | "'look_at':[r" + theUser.HomeLocation.X.ToString() + ",r" + |
243 | theUser.homeLocation.Y.ToString() + ",r" + theUser.homeLocation.Z.ToString() + "]}"; | 243 | theUser.HomeLocation.Y.ToString() + ",r" + theUser.HomeLocation.Z.ToString() + "]}"; |
244 | 244 | ||
245 | // Destination | 245 | // Destination |
246 | m_log.Info("[LOGIN]: " + | 246 | m_log.Info("[LOGIN]: " + |
@@ -259,21 +259,21 @@ namespace OpenSim.Grid.UserServer | |||
259 | m_log.Info("[LOGIN]: Notifying " + SimInfo.regionName + " (" + SimInfo.serverURI + ")"); | 259 | m_log.Info("[LOGIN]: Notifying " + SimInfo.regionName + " (" + SimInfo.serverURI + ")"); |
260 | 260 | ||
261 | // Update agent with target sim | 261 | // Update agent with target sim |
262 | theUser.currentAgent.currentRegion = SimInfo.UUID; | 262 | theUser.CurrentAgent.currentRegion = SimInfo.UUID; |
263 | theUser.currentAgent.currentHandle = SimInfo.regionHandle; | 263 | theUser.CurrentAgent.currentHandle = SimInfo.regionHandle; |
264 | 264 | ||
265 | // Prepare notification | 265 | // Prepare notification |
266 | Hashtable SimParams = new Hashtable(); | 266 | Hashtable SimParams = new Hashtable(); |
267 | SimParams["session_id"] = theUser.currentAgent.sessionID.ToString(); | 267 | SimParams["session_id"] = theUser.CurrentAgent.sessionID.ToString(); |
268 | SimParams["secure_session_id"] = theUser.currentAgent.secureSessionID.ToString(); | 268 | SimParams["secure_session_id"] = theUser.CurrentAgent.secureSessionID.ToString(); |
269 | SimParams["firstname"] = theUser.username; | 269 | SimParams["firstname"] = theUser.FirstName; |
270 | SimParams["lastname"] = theUser.surname; | 270 | SimParams["lastname"] = theUser.SurName; |
271 | SimParams["agent_id"] = theUser.UUID.ToString(); | 271 | SimParams["agent_id"] = theUser.Id.ToString(); |
272 | SimParams["circuit_code"] = (Int32) Convert.ToUInt32(response.CircuitCode); | 272 | SimParams["circuit_code"] = (Int32) Convert.ToUInt32(response.CircuitCode); |
273 | SimParams["startpos_x"] = theUser.currentAgent.currentPos.X.ToString(); | 273 | SimParams["startpos_x"] = theUser.CurrentAgent.currentPos.X.ToString(); |
274 | SimParams["startpos_y"] = theUser.currentAgent.currentPos.Y.ToString(); | 274 | SimParams["startpos_y"] = theUser.CurrentAgent.currentPos.Y.ToString(); |
275 | SimParams["startpos_z"] = theUser.currentAgent.currentPos.Z.ToString(); | 275 | SimParams["startpos_z"] = theUser.CurrentAgent.currentPos.Z.ToString(); |
276 | SimParams["regionhandle"] = theUser.currentAgent.currentHandle.ToString(); | 276 | SimParams["regionhandle"] = theUser.CurrentAgent.currentHandle.ToString(); |
277 | SimParams["caps_path"] = capsPath; | 277 | SimParams["caps_path"] = capsPath; |
278 | ArrayList SendParams = new ArrayList(); | 278 | ArrayList SendParams = new ArrayList(); |
279 | SendParams.Add(SimParams); | 279 | SendParams.Add(SimParams); |
@@ -286,9 +286,9 @@ namespace OpenSim.Grid.UserServer | |||
286 | if (handlerUserLoggedInAtLocation != null) | 286 | if (handlerUserLoggedInAtLocation != null) |
287 | { | 287 | { |
288 | m_log.Info("[LOGIN]: Letting other objects know about login"); | 288 | m_log.Info("[LOGIN]: Letting other objects know about login"); |
289 | handlerUserLoggedInAtLocation(theUser.UUID, theUser.currentAgent.sessionID, theUser.currentAgent.currentRegion, | 289 | handlerUserLoggedInAtLocation(theUser.Id, theUser.CurrentAgent.sessionID, theUser.CurrentAgent.currentRegion, |
290 | theUser.currentAgent.currentHandle, theUser.currentAgent.currentPos.X, theUser.currentAgent.currentPos.Y, theUser.currentAgent.currentPos.Z, | 290 | theUser.CurrentAgent.currentHandle, theUser.CurrentAgent.currentPos.X, theUser.CurrentAgent.currentPos.Y, theUser.CurrentAgent.currentPos.Z, |
291 | theUser.username, theUser.surname); | 291 | theUser.FirstName, theUser.SurName); |
292 | } | 292 | } |
293 | } | 293 | } |
294 | 294 | ||
diff --git a/OpenSim/Grid/UserServer/UserManager.cs b/OpenSim/Grid/UserServer/UserManager.cs index a6695c9..cf05bfd 100644 --- a/OpenSim/Grid/UserServer/UserManager.cs +++ b/OpenSim/Grid/UserServer/UserManager.cs | |||
@@ -125,31 +125,31 @@ namespace OpenSim.Grid.UserServer | |||
125 | Hashtable responseData = new Hashtable(); | 125 | Hashtable responseData = new Hashtable(); |
126 | 126 | ||
127 | // Account information | 127 | // Account information |
128 | responseData["firstname"] = profile.username; | 128 | responseData["firstname"] = profile.FirstName; |
129 | responseData["lastname"] = profile.surname; | 129 | responseData["lastname"] = profile.SurName; |
130 | responseData["uuid"] = profile.UUID.ToString(); | 130 | responseData["uuid"] = profile.Id.ToString(); |
131 | // Server Information | 131 | // Server Information |
132 | responseData["server_inventory"] = profile.userInventoryURI; | 132 | responseData["server_inventory"] = profile.UserInventoryURI; |
133 | responseData["server_asset"] = profile.userAssetURI; | 133 | responseData["server_asset"] = profile.UserAssetURI; |
134 | // Profile Information | 134 | // Profile Information |
135 | responseData["profile_about"] = profile.profileAboutText; | 135 | responseData["profile_about"] = profile.ProfileAboutText; |
136 | responseData["profile_firstlife_about"] = profile.profileFirstText; | 136 | responseData["profile_firstlife_about"] = profile.ProfileFirstText; |
137 | responseData["profile_firstlife_image"] = profile.profileFirstImage.ToString(); | 137 | responseData["profile_firstlife_image"] = profile.ProfileFirstImage.ToString(); |
138 | responseData["profile_can_do"] = profile.profileCanDoMask.ToString(); | 138 | responseData["profile_can_do"] = profile.ProfileCanDoMask.ToString(); |
139 | responseData["profile_want_do"] = profile.profileWantDoMask.ToString(); | 139 | responseData["profile_want_do"] = profile.ProfileWantDoMask.ToString(); |
140 | responseData["profile_image"] = profile.profileImage.ToString(); | 140 | responseData["profile_image"] = profile.ProfileImage.ToString(); |
141 | responseData["profile_created"] = profile.created.ToString(); | 141 | responseData["profile_created"] = profile.Created.ToString(); |
142 | responseData["profile_lastlogin"] = profile.lastLogin.ToString(); | 142 | responseData["profile_lastlogin"] = profile.LastLogin.ToString(); |
143 | // Home region information | 143 | // Home region information |
144 | responseData["home_coordinates_x"] = profile.homeLocation.X.ToString(); | 144 | responseData["home_coordinates_x"] = profile.HomeLocation.X.ToString(); |
145 | responseData["home_coordinates_y"] = profile.homeLocation.Y.ToString(); | 145 | responseData["home_coordinates_y"] = profile.HomeLocation.Y.ToString(); |
146 | responseData["home_coordinates_z"] = profile.homeLocation.Z.ToString(); | 146 | responseData["home_coordinates_z"] = profile.HomeLocation.Z.ToString(); |
147 | 147 | ||
148 | responseData["home_region"] = profile.homeRegion.ToString(); | 148 | responseData["home_region"] = profile.HomeRegion.ToString(); |
149 | 149 | ||
150 | responseData["home_look_x"] = profile.homeLookAt.X.ToString(); | 150 | responseData["home_look_x"] = profile.HomeLookAt.X.ToString(); |
151 | responseData["home_look_y"] = profile.homeLookAt.Y.ToString(); | 151 | responseData["home_look_y"] = profile.HomeLookAt.Y.ToString(); |
152 | responseData["home_look_z"] = profile.homeLookAt.Z.ToString(); | 152 | responseData["home_look_z"] = profile.HomeLookAt.Z.ToString(); |
153 | response.Value = responseData; | 153 | response.Value = responseData; |
154 | 154 | ||
155 | return response; | 155 | return response; |
@@ -341,11 +341,11 @@ namespace OpenSim.Grid.UserServer | |||
341 | } | 341 | } |
342 | if (requestData.Contains("FLImageID")) | 342 | if (requestData.Contains("FLImageID")) |
343 | { | 343 | { |
344 | userProfile.profileFirstImage = new LLUUID((string)requestData["FLImageID"]); | 344 | userProfile.ProfileFirstImage = new LLUUID((string)requestData["FLImageID"]); |
345 | } | 345 | } |
346 | if (requestData.Contains("ImageID")) | 346 | if (requestData.Contains("ImageID")) |
347 | { | 347 | { |
348 | userProfile.profileImage = new LLUUID((string)requestData["ImageID"]); | 348 | userProfile.ProfileImage = new LLUUID((string)requestData["ImageID"]); |
349 | } | 349 | } |
350 | // dont' know how yet | 350 | // dont' know how yet |
351 | if (requestData.Contains("MaturePublish")) | 351 | if (requestData.Contains("MaturePublish")) |
@@ -353,11 +353,11 @@ namespace OpenSim.Grid.UserServer | |||
353 | } | 353 | } |
354 | if (requestData.Contains("AboutText")) | 354 | if (requestData.Contains("AboutText")) |
355 | { | 355 | { |
356 | userProfile.profileAboutText = (string)requestData["AboutText"]; | 356 | userProfile.ProfileAboutText = (string)requestData["AboutText"]; |
357 | } | 357 | } |
358 | if (requestData.Contains("FLAboutText")) | 358 | if (requestData.Contains("FLAboutText")) |
359 | { | 359 | { |
360 | userProfile.profileFirstText = (string)requestData["FLAboutText"]; | 360 | userProfile.ProfileFirstText = (string)requestData["FLAboutText"]; |
361 | } | 361 | } |
362 | // not in DB yet. | 362 | // not in DB yet. |
363 | if (requestData.Contains("ProfileURL")) | 363 | if (requestData.Contains("ProfileURL")) |
diff --git a/OpenSim/Region/ClientStack/ClientView.cs b/OpenSim/Region/ClientStack/ClientView.cs index a91987f..e8c3f7c 100644 --- a/OpenSim/Region/ClientStack/ClientView.cs +++ b/OpenSim/Region/ClientStack/ClientView.cs | |||
@@ -3100,11 +3100,11 @@ namespace OpenSim.Region.ClientStack | |||
3100 | { | 3100 | { |
3101 | AvatarPropertiesUpdatePacket.PropertiesDataBlock Properties = Packet.PropertiesData; | 3101 | AvatarPropertiesUpdatePacket.PropertiesDataBlock Properties = Packet.PropertiesData; |
3102 | UserProfileData UserProfile = new UserProfileData(); | 3102 | UserProfileData UserProfile = new UserProfileData(); |
3103 | UserProfile.UUID = AgentId; | 3103 | UserProfile.Id = AgentId; |
3104 | UserProfile.profileAboutText = Helpers.FieldToUTF8String(Properties.AboutText); | 3104 | UserProfile.ProfileAboutText = Helpers.FieldToUTF8String(Properties.AboutText); |
3105 | UserProfile.profileFirstText = Helpers.FieldToUTF8String(Properties.FLAboutText); | 3105 | UserProfile.ProfileFirstText = Helpers.FieldToUTF8String(Properties.FLAboutText); |
3106 | UserProfile.profileFirstImage = Properties.FLImageID; | 3106 | UserProfile.ProfileFirstImage = Properties.FLImageID; |
3107 | UserProfile.profileImage = Properties.ImageID; | 3107 | UserProfile.ProfileImage = Properties.ImageID; |
3108 | 3108 | ||
3109 | handlerUpdateAvatarProperties(this, UserProfile); | 3109 | handlerUpdateAvatarProperties(this, UserProfile); |
3110 | } | 3110 | } |
diff --git a/OpenSim/Region/ClientStack/RegionApplicationBase.cs b/OpenSim/Region/ClientStack/RegionApplicationBase.cs index 4dd58f2..e91cab5 100644 --- a/OpenSim/Region/ClientStack/RegionApplicationBase.cs +++ b/OpenSim/Region/ClientStack/RegionApplicationBase.cs | |||
@@ -149,8 +149,8 @@ namespace OpenSim.Region.ClientStack | |||
149 | 149 | ||
150 | if (masterAvatar != null) | 150 | if (masterAvatar != null) |
151 | { | 151 | { |
152 | m_log.Info("[PARCEL]: Found master avatar [" + masterAvatar.UUID.ToString() + "]"); | 152 | m_log.Info("[PARCEL]: Found master avatar [" + masterAvatar.Id.ToString() + "]"); |
153 | scene.RegionInfo.MasterAvatarAssignedUUID = masterAvatar.UUID; | 153 | scene.RegionInfo.MasterAvatarAssignedUUID = masterAvatar.Id; |
154 | } | 154 | } |
155 | else | 155 | else |
156 | { | 156 | { |
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); |
diff --git a/OpenSim/Region/DataSnapshot/LandSnapshot.cs b/OpenSim/Region/DataSnapshot/LandSnapshot.cs index a8bbed1..a82f4be 100644 --- a/OpenSim/Region/DataSnapshot/LandSnapshot.cs +++ b/OpenSim/Region/DataSnapshot/LandSnapshot.cs | |||
@@ -223,7 +223,7 @@ namespace OpenSim.Region.DataSnapshot | |||
223 | { | 223 | { |
224 | XmlNode username = nodeFactory.CreateNode(XmlNodeType.Element, "name", ""); | 224 | XmlNode username = nodeFactory.CreateNode(XmlNodeType.Element, "name", ""); |
225 | UserProfileData userProfile = m_scene.CommsManager.UserService.GetUserProfile(userOwnerUUID); | 225 | UserProfileData userProfile = m_scene.CommsManager.UserService.GetUserProfile(userOwnerUUID); |
226 | username.InnerText = userProfile.username + " " + userProfile.surname; | 226 | username.InnerText = userProfile.FirstName + " " + userProfile.SurName; |
227 | userblock.AppendChild(username); | 227 | userblock.AppendChild(username); |
228 | } | 228 | } |
229 | catch (Exception) | 229 | catch (Exception) |
diff --git a/OpenSim/Region/Environment/Modules/AvatarProfilesModule.cs b/OpenSim/Region/Environment/Modules/AvatarProfilesModule.cs index 0ead5f7..699e68d 100644 --- a/OpenSim/Region/Environment/Modules/AvatarProfilesModule.cs +++ b/OpenSim/Region/Environment/Modules/AvatarProfilesModule.cs | |||
@@ -90,10 +90,10 @@ namespace OpenSim.Region.Environment.Modules | |||
90 | UserProfileData profile = m_scene.CommsManager.UserService.GetUserProfile(avatarID); | 90 | UserProfileData profile = m_scene.CommsManager.UserService.GetUserProfile(avatarID); |
91 | if (null != profile) | 91 | if (null != profile) |
92 | { | 92 | { |
93 | remoteClient.SendAvatarProperties(profile.UUID, profile.profileAboutText, | 93 | remoteClient.SendAvatarProperties(profile.Id, profile.ProfileAboutText, |
94 | Util.ToDateTime(profile.created).ToString(), | 94 | Util.ToDateTime(profile.Created).ToString(), |
95 | System.String.Empty, profile.profileFirstText, profile.profileCanDoMask, | 95 | System.String.Empty, profile.ProfileFirstText, profile.ProfileCanDoMask, |
96 | profile.profileFirstImage, profile.profileImage, System.String.Empty, partner); | 96 | profile.ProfileFirstImage, profile.ProfileImage, System.String.Empty, partner); |
97 | } | 97 | } |
98 | else | 98 | else |
99 | { | 99 | { |
@@ -103,15 +103,15 @@ namespace OpenSim.Region.Environment.Modules | |||
103 | 103 | ||
104 | public void UpdateAvatarProperties(IClientAPI remoteClient, UserProfileData newProfile) | 104 | public void UpdateAvatarProperties(IClientAPI remoteClient, UserProfileData newProfile) |
105 | { | 105 | { |
106 | UserProfileData Profile = m_scene.CommsManager.UserService.GetUserProfile(newProfile.UUID); | 106 | UserProfileData Profile = m_scene.CommsManager.UserService.GetUserProfile(newProfile.Id); |
107 | 107 | ||
108 | // if it's the profile of the user requesting the update, then we change only a few things. | 108 | // if it's the profile of the user requesting the update, then we change only a few things. |
109 | if (remoteClient.AgentId.CompareTo(Profile.UUID) == 0) | 109 | if (remoteClient.AgentId.CompareTo(Profile.Id) == 0) |
110 | { | 110 | { |
111 | Profile.profileImage = newProfile.profileImage; | 111 | Profile.ProfileImage = newProfile.ProfileImage; |
112 | Profile.profileFirstImage = newProfile.profileFirstImage; | 112 | Profile.ProfileFirstImage = newProfile.ProfileFirstImage; |
113 | Profile.profileAboutText = newProfile.profileAboutText; | 113 | Profile.ProfileAboutText = newProfile.ProfileAboutText; |
114 | Profile.profileFirstText = newProfile.profileFirstText; | 114 | Profile.ProfileFirstText = newProfile.ProfileFirstText; |
115 | } | 115 | } |
116 | else | 116 | else |
117 | { | 117 | { |
@@ -119,7 +119,7 @@ namespace OpenSim.Region.Environment.Modules | |||
119 | } | 119 | } |
120 | if (m_scene.CommsManager.UserService.UpdateUserProfileProperties(Profile)) | 120 | if (m_scene.CommsManager.UserService.UpdateUserProfileProperties(Profile)) |
121 | { | 121 | { |
122 | RequestAvatarProperty(remoteClient, newProfile.UUID); | 122 | RequestAvatarProperty(remoteClient, newProfile.Id); |
123 | } | 123 | } |
124 | } | 124 | } |
125 | } | 125 | } |
diff --git a/OpenSim/Region/Environment/Modules/VoiceModule.cs b/OpenSim/Region/Environment/Modules/VoiceModule.cs index b254507..8ca4698 100644 --- a/OpenSim/Region/Environment/Modules/VoiceModule.cs +++ b/OpenSim/Region/Environment/Modules/VoiceModule.cs | |||
@@ -180,7 +180,7 @@ namespace OpenSim.Region.Environment.Modules | |||
180 | if (null == userInfo) throw new Exception("cannot get user details"); | 180 | if (null == userInfo) throw new Exception("cannot get user details"); |
181 | 181 | ||
182 | LLSDVoiceAccountResponse voiceAccountResponse = | 182 | LLSDVoiceAccountResponse voiceAccountResponse = |
183 | new LLSDVoiceAccountResponse(voiceUser, "$1$" + userInfo.UserProfile.passwordHash); | 183 | new LLSDVoiceAccountResponse(voiceUser, "$1$" + userInfo.UserProfile.PasswordHash); |
184 | string r = LLSDHelpers.SerialiseLLSDReply(voiceAccountResponse); | 184 | string r = LLSDHelpers.SerialiseLLSDReply(voiceAccountResponse); |
185 | m_log.DebugFormat("[CAPS][PROVISIONVOICE]: {0}", r); | 185 | m_log.DebugFormat("[CAPS][PROVISIONVOICE]: {0}", r); |
186 | return r; | 186 | return r; |
diff --git a/OpenSim/Region/ScriptEngine/Common/LSL_BuiltIn_Commands.cs b/OpenSim/Region/ScriptEngine/Common/LSL_BuiltIn_Commands.cs index 50bd386..a070248 100644 --- a/OpenSim/Region/ScriptEngine/Common/LSL_BuiltIn_Commands.cs +++ b/OpenSim/Region/ScriptEngine/Common/LSL_BuiltIn_Commands.cs | |||
@@ -407,7 +407,7 @@ namespace OpenSim.Region.ScriptEngine.Common | |||
407 | UserProfileData profile = World.CommsManager.UserService.GetUserProfile(objecUUID); | 407 | UserProfileData profile = World.CommsManager.UserService.GetUserProfile(objecUUID); |
408 | if (profile != null) | 408 | if (profile != null) |
409 | { | 409 | { |
410 | string avatarname = profile.username + " " + profile.surname; | 410 | string avatarname = profile.FirstName + " " + profile.SurName; |
411 | return avatarname; | 411 | return avatarname; |
412 | } | 412 | } |
413 | // try an scene object | 413 | // try an scene object |
diff --git a/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/AsyncCommandPlugins/SensorRepeat.cs b/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/AsyncCommandPlugins/SensorRepeat.cs index c025b5b..fd8dbd1 100644 --- a/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/AsyncCommandPlugins/SensorRepeat.cs +++ b/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/AsyncCommandPlugins/SensorRepeat.cs | |||
@@ -272,7 +272,7 @@ namespace OpenSim.Region.ScriptEngine.Common.ScriptEngineBase.AsyncCommandPlugin | |||
272 | UserProfileData profile = m_CmdManager.m_ScriptEngine.World.CommsManager.UserService.GetUserProfile(ent.UUID); | 272 | UserProfileData profile = m_CmdManager.m_ScriptEngine.World.CommsManager.UserService.GetUserProfile(ent.UUID); |
273 | if (profile != null) | 273 | if (profile != null) |
274 | { | 274 | { |
275 | avatarname = profile.username + " " + profile.surname; | 275 | avatarname = profile.FirstName + " " + profile.SurName; |
276 | } | 276 | } |
277 | // try an scene object | 277 | // try an scene object |
278 | SceneObjectPart SOP = m_CmdManager.m_ScriptEngine.World.GetSceneObjectPart(ent.UUID); | 278 | SceneObjectPart SOP = m_CmdManager.m_ScriptEngine.World.GetSceneObjectPart(ent.UUID); |