aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Services
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--OpenSim/Services/Interfaces/IGridService.cs4
-rw-r--r--OpenSim/Services/Interfaces/IHypergridServices.cs3
-rw-r--r--OpenSim/Services/Interfaces/IUserProfilesService.cs5
-rw-r--r--OpenSim/Services/UserProfilesService/UserProfilesService.cs73
4 files changed, 81 insertions, 4 deletions
diff --git a/OpenSim/Services/Interfaces/IGridService.cs b/OpenSim/Services/Interfaces/IGridService.cs
index df2b4d7..d4708b7 100644
--- a/OpenSim/Services/Interfaces/IGridService.cs
+++ b/OpenSim/Services/Interfaces/IGridService.cs
@@ -177,6 +177,7 @@ namespace OpenSim.Services.Interfaces
177 177
178 /// <summary> 178 /// <summary>
179 /// The location of this region in meters. 179 /// The location of this region in meters.
180 /// DANGER DANGER! Note that this name means something different in RegionInfo.
180 /// </summary> 181 /// </summary>
181 public int RegionLocX 182 public int RegionLocX
182 { 183 {
@@ -189,7 +190,8 @@ namespace OpenSim.Services.Interfaces
189 public int RegionSizeY { get; set; } 190 public int RegionSizeY { get; set; }
190 191
191 /// <summary> 192 /// <summary>
192 /// The location of this region in meters. 193 /// The location of this region in meters.
194 /// DANGER DANGER! Note that this name means something different in RegionInfo.
193 /// </summary> 195 /// </summary>
194 public int RegionLocY 196 public int RegionLocY
195 { 197 {
diff --git a/OpenSim/Services/Interfaces/IHypergridServices.cs b/OpenSim/Services/Interfaces/IHypergridServices.cs
index f9e7f08..05e175a 100644
--- a/OpenSim/Services/Interfaces/IHypergridServices.cs
+++ b/OpenSim/Services/Interfaces/IHypergridServices.cs
@@ -43,9 +43,6 @@ namespace OpenSim.Services.Interfaces
43 43
44 } 44 }
45 45
46 /// <summary>
47 /// HG1.5 only
48 /// </summary>
49 public interface IUserAgentService 46 public interface IUserAgentService
50 { 47 {
51 bool LoginAgentToGrid(AgentCircuitData agent, GridRegion gatekeeper, GridRegion finalDestination, bool fromLogin, out string reason); 48 bool LoginAgentToGrid(AgentCircuitData agent, GridRegion gatekeeper, GridRegion finalDestination, bool fromLogin, out string reason);
diff --git a/OpenSim/Services/Interfaces/IUserProfilesService.cs b/OpenSim/Services/Interfaces/IUserProfilesService.cs
index 319d307..121baa8 100644
--- a/OpenSim/Services/Interfaces/IUserProfilesService.cs
+++ b/OpenSim/Services/Interfaces/IUserProfilesService.cs
@@ -57,6 +57,11 @@ namespace OpenSim.Services.Interfaces
57 bool AvatarPropertiesRequest(ref UserProfileProperties prop, ref string result); 57 bool AvatarPropertiesRequest(ref UserProfileProperties prop, ref string result);
58 bool AvatarPropertiesUpdate(ref UserProfileProperties prop, ref string result); 58 bool AvatarPropertiesUpdate(ref UserProfileProperties prop, ref string result);
59 #endregion Profile Properties 59 #endregion Profile Properties
60
61 #region User Preferences
62 bool UserPreferencesRequest(ref UserPreferences pref, ref string result);
63 bool UserPreferencesUpdate(ref UserPreferences pref, ref string result);
64 #endregion User Preferences
60 65
61 #region Interests 66 #region Interests
62 bool AvatarInterestsUpdate(UserProfileProperties prop, ref string result); 67 bool AvatarInterestsUpdate(UserProfileProperties prop, ref string result);
diff --git a/OpenSim/Services/UserProfilesService/UserProfilesService.cs b/OpenSim/Services/UserProfilesService/UserProfilesService.cs
index d00f34d..dd26cdc 100644
--- a/OpenSim/Services/UserProfilesService/UserProfilesService.cs
+++ b/OpenSim/Services/UserProfilesService/UserProfilesService.cs
@@ -37,6 +37,7 @@ using OpenSim.Data;
37using OpenMetaverse; 37using OpenMetaverse;
38using OpenMetaverse.StructuredData; 38using OpenMetaverse.StructuredData;
39using OpenSim.Framework; 39using OpenSim.Framework;
40using OpenSim.Services.UserAccountService;
40 41
41namespace OpenSim.Services.ProfilesService 42namespace OpenSim.Services.ProfilesService
42{ 43{
@@ -163,6 +164,78 @@ namespace OpenSim.Services.ProfilesService
163 } 164 }
164 #endregion Interests 165 #endregion Interests
165 166
167 #region User Preferences
168 public bool UserPreferencesUpdate(ref UserPreferences pref, ref string result)
169 {
170 if(string.IsNullOrEmpty(pref.EMail))
171 {
172 UserAccount account = new UserAccount();
173 if(userAccounts is UserAccountService.UserAccountService)
174 {
175 try
176 {
177 account = userAccounts.GetUserAccount(UUID.Zero, pref.UserId);
178 if(string.IsNullOrEmpty(account.Email))
179 {
180 result = "No Email address on record!";
181 return false;
182 }
183 else
184 pref.EMail = account.Email;
185 }
186 catch
187 {
188 m_log.Info ("[PROFILES]: UserAccountService Exception: Could not get user account");
189 result = "Missing Email address!";
190 return false;
191 }
192 }
193 else
194 {
195 m_log.Info ("[PROFILES]: UserAccountService: Could not get user account");
196 result = "Missing Email address!";
197 return false;
198 }
199 }
200 return ProfilesData.UpdateUserPreferences(ref pref, ref result);
201 }
202
203 public bool UserPreferencesRequest(ref UserPreferences pref, ref string result)
204 {
205 if(string.IsNullOrEmpty(pref.EMail))
206 {
207 UserAccount account = new UserAccount();
208 if(userAccounts is UserAccountService.UserAccountService)
209 {
210 try
211 {
212 account = userAccounts.GetUserAccount(UUID.Zero, pref.UserId);
213 if(string.IsNullOrEmpty(account.Email))
214 {
215 result = "No Email address on record!";
216 return false;
217 }
218 else
219 pref.EMail = account.Email;
220 }
221 catch
222 {
223 m_log.Info ("[PROFILES]: UserAccountService Exception: Could not get user account");
224 result = "Missing Email address!";
225 return false;
226 }
227 }
228 else
229 {
230 m_log.Info ("[PROFILES]: UserAccountService: Could not get user account");
231 result = "Missing Email address!";
232 return false;
233 }
234 }
235 return ProfilesData.GetUserPreferences(ref pref, ref result);
236 }
237 #endregion User Preferences
238
166 #region Utility 239 #region Utility
167 public OSD AvatarImageAssetsRequest(UUID avatarId) 240 public OSD AvatarImageAssetsRequest(UUID avatarId)
168 { 241 {