aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region
diff options
context:
space:
mode:
authorJustin Clarke Casey2008-09-15 19:02:34 +0000
committerJustin Clarke Casey2008-09-15 19:02:34 +0000
commitddaa90d270c9bd10c74cf89b29b45963719f9b60 (patch)
tree638e92f3f5a079335901dc4011a1425f33ff2328 /OpenSim/Region
parent* oops! Add interface file I forgot in the last checkin (diff)
downloadopensim-SC_OLD-ddaa90d270c9bd10c74cf89b29b45963719f9b60.zip
opensim-SC_OLD-ddaa90d270c9bd10c74cf89b29b45963719f9b60.tar.gz
opensim-SC_OLD-ddaa90d270c9bd10c74cf89b29b45963719f9b60.tar.bz2
opensim-SC_OLD-ddaa90d270c9bd10c74cf89b29b45963719f9b60.tar.xz
* refactor: collapse UpdateUserProfileProperties() into existing UpdateUserProfile
* the methods were identical except that the Properties one did a check for the user profile beforehand. However, every caller was doing this already anyway.
Diffstat (limited to 'OpenSim/Region')
-rw-r--r--OpenSim/Region/Communications/OGS1/OGS1UserServices.cs51
-rw-r--r--OpenSim/Region/Environment/Modules/Avatar/Profiles/AvatarProfilesModule.cs3
-rw-r--r--OpenSim/Region/Environment/Scenes/Scene.cs4
3 files changed, 27 insertions, 31 deletions
diff --git a/OpenSim/Region/Communications/OGS1/OGS1UserServices.cs b/OpenSim/Region/Communications/OGS1/OGS1UserServices.cs
index 0ca85d2..28177d0 100644
--- a/OpenSim/Region/Communications/OGS1/OGS1UserServices.cs
+++ b/OpenSim/Region/Communications/OGS1/OGS1UserServices.cs
@@ -475,38 +475,32 @@ namespace OpenSim.Region.Communications.OGS1
475 throw new Exception("The method or operation is not implemented."); 475 throw new Exception("The method or operation is not implemented.");
476 } 476 }
477 477
478 // TODO 478 public bool UpdateUserProfile(UserProfileData userProfile)
479 public bool UpdateUserProfile(UserProfileData data)
480 {
481 return false;
482 }
483
484 public bool UpdateUserProfileProperties(UserProfileData UserProfile)
485 { 479 {
486 m_log.Debug("[OGS1 USER SERVICES]: Asking UserServer to update profile."); 480 m_log.Debug("[OGS1 USER SERVICES]: Asking UserServer to update profile.");
487 Hashtable param = new Hashtable(); 481 Hashtable param = new Hashtable();
488 param["avatar_uuid"] = UserProfile.ID.ToString(); 482 param["avatar_uuid"] = userProfile.ID.ToString();
489 //param["AllowPublish"] = UserProfile.ToString(); 483 //param["AllowPublish"] = userProfile.ToString();
490 param["FLImageID"] = UserProfile.FirstLifeImage.ToString(); 484 param["FLImageID"] = userProfile.FirstLifeImage.ToString();
491 param["ImageID"] = UserProfile.Image.ToString(); 485 param["ImageID"] = userProfile.Image.ToString();
492 //param["MaturePublish"] = MaturePublish.ToString(); 486 //param["MaturePublish"] = MaturePublish.ToString();
493 param["AboutText"] = UserProfile.AboutText; 487 param["AboutText"] = userProfile.AboutText;
494 param["FLAboutText"] = UserProfile.FirstLifeAboutText; 488 param["FLAboutText"] = userProfile.FirstLifeAboutText;
495 //param["ProfileURL"] = UserProfile.ProfileURL.ToString(); 489 //param["ProfileURL"] = userProfile.ProfileURL.ToString();
496 490
497 param["home_region"] = UserProfile.HomeRegion.ToString(); 491 param["home_region"] = userProfile.HomeRegion.ToString();
498 param["home_region_id"] = UserProfile.HomeRegionID.ToString(); 492 param["home_region_id"] = userProfile.HomeRegionID.ToString();
499 493
500 param["home_pos_x"] = UserProfile.HomeLocationX.ToString(); 494 param["home_pos_x"] = userProfile.HomeLocationX.ToString();
501 param["home_pos_y"] = UserProfile.HomeLocationY.ToString(); 495 param["home_pos_y"] = userProfile.HomeLocationY.ToString();
502 param["home_pos_z"] = UserProfile.HomeLocationZ.ToString(); 496 param["home_pos_z"] = userProfile.HomeLocationZ.ToString();
503 param["home_look_x"] = UserProfile.HomeLookAtX.ToString(); 497 param["home_look_x"] = userProfile.HomeLookAtX.ToString();
504 param["home_look_y"] = UserProfile.HomeLookAtY.ToString(); 498 param["home_look_y"] = userProfile.HomeLookAtY.ToString();
505 param["home_look_z"] = UserProfile.HomeLookAtZ.ToString(); 499 param["home_look_z"] = userProfile.HomeLookAtZ.ToString();
506 param["user_flags"] = UserProfile.UserFlags.ToString(); 500 param["user_flags"] = userProfile.UserFlags.ToString();
507 param["god_level"] = UserProfile.GodLevel.ToString(); 501 param["god_level"] = userProfile.GodLevel.ToString();
508 param["custom_type"] = UserProfile.CustomType.ToString(); 502 param["custom_type"] = userProfile.CustomType.ToString();
509 param["partner"] = UserProfile.Partner.ToString(); 503 param["partner"] = userProfile.Partner.ToString();
510 504
511 IList parameters = new ArrayList(); 505 IList parameters = new ArrayList();
512 parameters.Add(param); 506 parameters.Add(param);
@@ -535,6 +529,7 @@ namespace OpenSim.Region.Communications.OGS1
535 m_log.Warn("[GRID]: Unable to update user profile, UserServer didn't understand me!"); 529 m_log.Warn("[GRID]: Unable to update user profile, UserServer didn't understand me!");
536 return false; 530 return false;
537 } 531 }
532
538 return true; 533 return true;
539 } 534 }
540 535
diff --git a/OpenSim/Region/Environment/Modules/Avatar/Profiles/AvatarProfilesModule.cs b/OpenSim/Region/Environment/Modules/Avatar/Profiles/AvatarProfilesModule.cs
index f9c0dcf..b1cf802 100644
--- a/OpenSim/Region/Environment/Modules/Avatar/Profiles/AvatarProfilesModule.cs
+++ b/OpenSim/Region/Environment/Modules/Avatar/Profiles/AvatarProfilesModule.cs
@@ -134,7 +134,8 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Profiles
134 { 134 {
135 return; 135 return;
136 } 136 }
137 if (m_scene.CommsManager.UserService.UpdateUserProfileProperties(Profile)) 137
138 if (m_scene.CommsManager.UserService.UpdateUserProfile(Profile))
138 { 139 {
139 RequestAvatarProperty(remoteClient, newProfile.ID); 140 RequestAvatarProperty(remoteClient, newProfile.ID);
140 } 141 }
diff --git a/OpenSim/Region/Environment/Scenes/Scene.cs b/OpenSim/Region/Environment/Scenes/Scene.cs
index 7116904..2a736fb 100644
--- a/OpenSim/Region/Environment/Scenes/Scene.cs
+++ b/OpenSim/Region/Environment/Scenes/Scene.cs
@@ -2254,7 +2254,7 @@ namespace OpenSim.Region.Environment.Scenes
2254 return; 2254 return;
2255 } 2255 }
2256 UserProfile.HomeRegionID = info.RegionID; 2256 UserProfile.HomeRegionID = info.RegionID;
2257 CommsManager.UserService.UpdateUserProfileProperties(UserProfile); 2257 CommsManager.UserService.UpdateUserProfile(UserProfile);
2258 } 2258 }
2259 else 2259 else
2260 { 2260 {
@@ -2355,7 +2355,7 @@ namespace OpenSim.Region.Environment.Scenes
2355 UserProfile.HomeRegion = RegionInfo.RegionHandle; 2355 UserProfile.HomeRegion = RegionInfo.RegionHandle;
2356 UserProfile.HomeLocation = position; 2356 UserProfile.HomeLocation = position;
2357 UserProfile.HomeLookAt = lookAt; 2357 UserProfile.HomeLookAt = lookAt;
2358 CommsManager.UserService.UpdateUserProfileProperties(UserProfile); 2358 CommsManager.UserService.UpdateUserProfile(UserProfile);
2359 2359
2360 remoteClient.SendAgentAlertMessage("Set home to here if supported by login service",false); 2360 remoteClient.SendAgentAlertMessage("Set home to here if supported by login service",false);
2361 } 2361 }