diff options
author | Teravus Ovares | 2008-03-03 08:30:36 +0000 |
---|---|---|
committer | Teravus Ovares | 2008-03-03 08:30:36 +0000 |
commit | fe49c96ee0db0974a91b9b175ac1b00aef035797 (patch) | |
tree | 27fb1de9eea228d2e89e1c5b1c83cca8577b3bd9 /OpenSim/Framework/Communications | |
parent | * Doh, forgot one license header (diff) | |
download | opensim-SC-fe49c96ee0db0974a91b9b175ac1b00aef035797.zip opensim-SC-fe49c96ee0db0974a91b9b175ac1b00aef035797.tar.gz opensim-SC-fe49c96ee0db0974a91b9b175ac1b00aef035797.tar.bz2 opensim-SC-fe49c96ee0db0974a91b9b175ac1b00aef035797.tar.xz |
* Applying Ahzz's profile patch. Thanks Ahzz!
* Fixed a few bugs in the patch that are sim crashers.
* There's still a bug in mySQL mode/ grid mode where the main userprofile text doesn't save.
Diffstat (limited to 'OpenSim/Framework/Communications')
-rw-r--r-- | OpenSim/Framework/Communications/CommunicationsManager.cs | 6 | ||||
-rw-r--r-- | OpenSim/Framework/Communications/UserManagerBase.cs | 31 |
2 files changed, 32 insertions, 5 deletions
diff --git a/OpenSim/Framework/Communications/CommunicationsManager.cs b/OpenSim/Framework/Communications/CommunicationsManager.cs index 4ad808a..655abd7 100644 --- a/OpenSim/Framework/Communications/CommunicationsManager.cs +++ b/OpenSim/Framework/Communications/CommunicationsManager.cs | |||
@@ -229,6 +229,12 @@ namespace OpenSim.Framework.Communications | |||
229 | 229 | ||
230 | #region Packet Handlers | 230 | #region Packet Handlers |
231 | 231 | ||
232 | public void UpdateAvatarPropertiesRequest(IClientAPI remote_client, UserProfileData UserProfile) | ||
233 | { | ||
234 | m_userService.UpdateUserProfileProperties(UserProfile); | ||
235 | return; | ||
236 | } | ||
237 | |||
232 | public void HandleUUIDNameRequest(LLUUID uuid, IClientAPI remote_client) | 238 | public void HandleUUIDNameRequest(LLUUID uuid, IClientAPI remote_client) |
233 | { | 239 | { |
234 | if (uuid == m_userProfileCacheService.libraryRoot.agentID) | 240 | if (uuid == m_userProfileCacheService.libraryRoot.agentID) |
diff --git a/OpenSim/Framework/Communications/UserManagerBase.cs b/OpenSim/Framework/Communications/UserManagerBase.cs index 733d62b..3380e90 100644 --- a/OpenSim/Framework/Communications/UserManagerBase.cs +++ b/OpenSim/Framework/Communications/UserManagerBase.cs | |||
@@ -139,11 +139,10 @@ namespace OpenSim.Framework.UserManagement | |||
139 | } | 139 | } |
140 | 140 | ||
141 | /// <summary> | 141 | /// <summary> |
142 | /// Set's user profile from object | 142 | /// Set's user profile from data object |
143 | /// </summary> | 143 | /// </summary> |
144 | /// <param name="fname">First name</param> | 144 | /// <param name="data"></param> |
145 | /// <param name="lname">Last name</param> | 145 | /// <returns></returns> |
146 | /// <returns>A user profile</returns> | ||
147 | public bool setUserProfile(UserProfileData data) | 146 | public bool setUserProfile(UserProfileData data) |
148 | { | 147 | { |
149 | foreach (KeyValuePair<string, IUserData> plugin in _plugins) | 148 | foreach (KeyValuePair<string, IUserData> plugin in _plugins) |
@@ -158,7 +157,6 @@ namespace OpenSim.Framework.UserManagement | |||
158 | m_log.Info("[USERSTORAGE]: Unable to set user via " + plugin.Key + "(" + e.ToString() + ")"); | 157 | m_log.Info("[USERSTORAGE]: Unable to set user via " + plugin.Key + "(" + e.ToString() + ")"); |
159 | } | 158 | } |
160 | } | 159 | } |
161 | |||
162 | return false; | 160 | return false; |
163 | } | 161 | } |
164 | 162 | ||
@@ -534,6 +532,29 @@ namespace OpenSim.Framework.UserManagement | |||
534 | return user.UUID; | 532 | return user.UUID; |
535 | } | 533 | } |
536 | 534 | ||
535 | public bool UpdateUserProfileProperties(UserProfileData UserProfile) | ||
536 | { | ||
537 | if (null == GetUserProfile(UserProfile.UUID)) | ||
538 | { | ||
539 | m_log.Info("[USERSTORAGE]: Failed to find User by UUID " + UserProfile.UUID.ToString()); | ||
540 | return false; | ||
541 | } | ||
542 | foreach (KeyValuePair<string, IUserData> plugin in _plugins) | ||
543 | { | ||
544 | try | ||
545 | { | ||
546 | plugin.Value.UpdateUserProfile(UserProfile); | ||
547 | } | ||
548 | catch (Exception e) | ||
549 | { | ||
550 | m_log.Info("[USERSTORAGE]: Unable to update user " + UserProfile.UUID.ToString() | ||
551 | + " via " + plugin.Key + "(" + e.ToString() + ")"); | ||
552 | return false; | ||
553 | } | ||
554 | } | ||
555 | return true; | ||
556 | } | ||
557 | |||
537 | public abstract UserProfileData SetupMasterUser(string firstName, string lastName); | 558 | public abstract UserProfileData SetupMasterUser(string firstName, string lastName); |
538 | public abstract UserProfileData SetupMasterUser(string firstName, string lastName, string password); | 559 | public abstract UserProfileData SetupMasterUser(string firstName, string lastName, string password); |
539 | public abstract UserProfileData SetupMasterUser(LLUUID uuid); | 560 | public abstract UserProfileData SetupMasterUser(LLUUID uuid); |