diff options
Diffstat (limited to 'OpenSim/Grid')
-rw-r--r-- | OpenSim/Grid/UserServer/UserLoginService.cs | 81 | ||||
-rw-r--r-- | OpenSim/Grid/UserServer/UserManager.cs | 176 |
2 files changed, 138 insertions, 119 deletions
diff --git a/OpenSim/Grid/UserServer/UserLoginService.cs b/OpenSim/Grid/UserServer/UserLoginService.cs index 972f363..198f95c 100644 --- a/OpenSim/Grid/UserServer/UserLoginService.cs +++ b/OpenSim/Grid/UserServer/UserLoginService.cs | |||
@@ -40,7 +40,8 @@ using OpenSim.Framework.Communications.Cache; | |||
40 | namespace OpenSim.Grid.UserServer | 40 | namespace OpenSim.Grid.UserServer |
41 | { | 41 | { |
42 | public delegate void UserLoggedInAtLocation(LLUUID agentID, LLUUID sessionID, LLUUID RegionID, | 42 | public delegate void UserLoggedInAtLocation(LLUUID agentID, LLUUID sessionID, LLUUID RegionID, |
43 | ulong regionhandle, float positionX, float positionY, float positionZ, string firstname, string lastname); | 43 | ulong regionhandle, float positionX, float positionY, float positionZ, |
44 | string firstname, string lastname); | ||
44 | 45 | ||
45 | public class UserLoginService : LoginService | 46 | public class UserLoginService : LoginService |
46 | { | 47 | { |
@@ -55,7 +56,8 @@ namespace OpenSim.Grid.UserServer | |||
55 | public UserConfig m_config; | 56 | public UserConfig m_config; |
56 | 57 | ||
57 | public UserLoginService( | 58 | public UserLoginService( |
58 | UserManagerBase userManager, IInterServiceInventoryServices inventoryService, LibraryRootFolder libraryRootFolder, | 59 | UserManagerBase userManager, IInterServiceInventoryServices inventoryService, |
60 | LibraryRootFolder libraryRootFolder, | ||
59 | UserConfig config, string welcomeMess) | 61 | UserConfig config, string welcomeMess) |
60 | : base(userManager, libraryRootFolder, welcomeMess) | 62 | : base(userManager, libraryRootFolder, welcomeMess) |
61 | { | 63 | { |
@@ -69,8 +71,8 @@ namespace OpenSim.Grid.UserServer | |||
69 | try | 71 | try |
70 | { | 72 | { |
71 | SimInfo = RegionProfileData.RequestSimProfileData( | 73 | SimInfo = RegionProfileData.RequestSimProfileData( |
72 | theUser.CurrentAgent.Handle, m_config.GridServerURL, | 74 | theUser.CurrentAgent.Handle, m_config.GridServerURL, |
73 | m_config.GridSendKey, m_config.GridRecvKey); | 75 | m_config.GridSendKey, m_config.GridRecvKey); |
74 | 76 | ||
75 | if (SimInfo == null) | 77 | if (SimInfo == null) |
76 | { | 78 | { |
@@ -99,7 +101,8 @@ namespace OpenSim.Grid.UserServer | |||
99 | 101 | ||
100 | m_log.InfoFormat( | 102 | m_log.InfoFormat( |
101 | "[ASSUMED CRASH]: Telling region {0} @ {1},{2} ({3}) that their agent is dead: {4}", | 103 | "[ASSUMED CRASH]: Telling region {0} @ {1},{2} ({3}) that their agent is dead: {4}", |
102 | SimInfo.regionName, SimInfo.regionLocX, SimInfo.regionLocY, SimInfo.httpServerURI, theUser.FirstName + " " + theUser.SurName); | 104 | SimInfo.regionName, SimInfo.regionLocX, SimInfo.regionLocY, SimInfo.httpServerURI, |
105 | theUser.FirstName + " " + theUser.SurName); | ||
103 | 106 | ||
104 | try | 107 | try |
105 | { | 108 | { |
@@ -120,6 +123,7 @@ namespace OpenSim.Grid.UserServer | |||
120 | 123 | ||
121 | //base.LogOffUser(theUser); | 124 | //base.LogOffUser(theUser); |
122 | } | 125 | } |
126 | |||
123 | //public override void LogOffUser(UserProfileData theUser) | 127 | //public override void LogOffUser(UserProfileData theUser) |
124 | //{ | 128 | //{ |
125 | 129 | ||
@@ -131,7 +135,8 @@ namespace OpenSim.Grid.UserServer | |||
131 | /// <param name="response">The existing response</param> | 135 | /// <param name="response">The existing response</param> |
132 | /// <param name="theUser">The user profile</param> | 136 | /// <param name="theUser">The user profile</param> |
133 | /// <param name="startLocationRequest">Destination of the user</param> | 137 | /// <param name="startLocationRequest">Destination of the user</param> |
134 | public override void CustomiseResponse(LoginResponse response, UserProfileData theUser, string startLocationRequest) | 138 | public override void CustomiseResponse(LoginResponse response, UserProfileData theUser, |
139 | string startLocationRequest) | ||
135 | { | 140 | { |
136 | bool tryDefault = false; | 141 | bool tryDefault = false; |
137 | //CFK: Since the try is always "tried", the "Home Location" message should always appear, so comment this one. | 142 | //CFK: Since the try is always "tried", the "Home Location" message should always appear, so comment this one. |
@@ -175,7 +180,9 @@ namespace OpenSim.Grid.UserServer | |||
175 | else | 180 | else |
176 | { | 181 | { |
177 | string[] startLocationRequestParsed = Util.ParseStartLocationRequest(startLocationRequest); | 182 | string[] startLocationRequestParsed = Util.ParseStartLocationRequest(startLocationRequest); |
178 | m_log.Info("[DEBUGLOGINPARSE]: 1:" + startLocationRequestParsed[0] + ", 2:" + startLocationRequestParsed[1] + ", 3:" + startLocationRequestParsed[2] + ", 4:" + startLocationRequestParsed[3]); | 183 | m_log.Info("[DEBUGLOGINPARSE]: 1:" + startLocationRequestParsed[0] + ", 2:" + |
184 | startLocationRequestParsed[1] + ", 3:" + startLocationRequestParsed[2] + ", 4:" + | ||
185 | startLocationRequestParsed[3]); | ||
179 | if (startLocationRequestParsed[0] == "last") | 186 | if (startLocationRequestParsed[0] == "last") |
180 | { | 187 | { |
181 | SimInfo = | 188 | SimInfo = |
@@ -187,9 +194,9 @@ namespace OpenSim.Grid.UserServer | |||
187 | { | 194 | { |
188 | m_log.Info("[LOGIN]: Looking up Sim: " + startLocationRequestParsed[0]); | 195 | m_log.Info("[LOGIN]: Looking up Sim: " + startLocationRequestParsed[0]); |
189 | SimInfo = | 196 | SimInfo = |
190 | RegionProfileData.RequestSimProfileData( | 197 | RegionProfileData.RequestSimProfileData( |
191 | startLocationRequestParsed[0], m_config.GridServerURL, | 198 | startLocationRequestParsed[0], m_config.GridServerURL, |
192 | m_config.GridSendKey, m_config.GridRecvKey); | 199 | m_config.GridSendKey, m_config.GridRecvKey); |
193 | 200 | ||
194 | if (SimInfo == null) | 201 | if (SimInfo == null) |
195 | { | 202 | { |
@@ -208,11 +215,13 @@ namespace OpenSim.Grid.UserServer | |||
208 | // Customise the response | 215 | // Customise the response |
209 | //CFK: This is redundant and the next message should always appear. | 216 | //CFK: This is redundant and the next message should always appear. |
210 | //CFK: m_log.Info("[LOGIN]: Home Location"); | 217 | //CFK: m_log.Info("[LOGIN]: Home Location"); |
211 | response.Home = string.Format("{{'region_handle':[r{0},r{1}], 'position':[r{2},r{3},r{4}], 'look_at':[r{5},r{6},r{7}]}}", | 218 | response.Home = |
212 | (HomeInfo.regionLocX * Constants.RegionSize), | 219 | string.Format( |
213 | (HomeInfo.regionLocY * Constants.RegionSize), | 220 | "{{'region_handle':[r{0},r{1}], 'position':[r{2},r{3},r{4}], 'look_at':[r{5},r{6},r{7}]}}", |
214 | theUser.HomeLocation.X, theUser.HomeLocation.Y, theUser.HomeLocation.Z, | 221 | (HomeInfo.regionLocX*Constants.RegionSize), |
215 | theUser.HomeLookAt.X, theUser.HomeLookAt.Y, theUser.HomeLookAt.Z); | 222 | (HomeInfo.regionLocY*Constants.RegionSize), |
223 | theUser.HomeLocation.X, theUser.HomeLocation.Y, theUser.HomeLocation.Z, | ||
224 | theUser.HomeLookAt.X, theUser.HomeLookAt.Y, theUser.HomeLookAt.Z); | ||
216 | 225 | ||
217 | // Destination | 226 | // Destination |
218 | //CFK: The "Notifying" message always seems to appear, so subsume the data from this message into | 227 | //CFK: The "Notifying" message always seems to appear, so subsume the data from this message into |
@@ -220,7 +229,7 @@ namespace OpenSim.Grid.UserServer | |||
220 | //CFK: m_log.Info("[LOGIN]: CUSTOMISERESPONSE: Region X: " + SimInfo.regionLocX + | 229 | //CFK: m_log.Info("[LOGIN]: CUSTOMISERESPONSE: Region X: " + SimInfo.regionLocX + |
221 | //CFK: "; Region Y: " + SimInfo.regionLocY); | 230 | //CFK: "; Region Y: " + SimInfo.regionLocY); |
222 | response.SimAddress = Util.GetHostFromURL(SimInfo.serverURI).ToString(); | 231 | response.SimAddress = Util.GetHostFromURL(SimInfo.serverURI).ToString(); |
223 | response.SimPort = uint.Parse(SimInfo.serverURI.Split(new char[] { '/', ':' })[4]); | 232 | response.SimPort = uint.Parse(SimInfo.serverURI.Split(new char[] {'/', ':'})[4]); |
224 | response.RegionX = SimInfo.regionLocX; | 233 | response.RegionX = SimInfo.regionLocX; |
225 | response.RegionY = SimInfo.regionLocY; | 234 | response.RegionY = SimInfo.regionLocY; |
226 | 235 | ||
@@ -283,10 +292,10 @@ namespace OpenSim.Grid.UserServer | |||
283 | 292 | ||
284 | if (GridResp.Value != null) | 293 | if (GridResp.Value != null) |
285 | { | 294 | { |
286 | Hashtable resp = (Hashtable)GridResp.Value; | 295 | Hashtable resp = (Hashtable) GridResp.Value; |
287 | if (resp.ContainsKey("success")) | 296 | if (resp.ContainsKey("success")) |
288 | { | 297 | { |
289 | if ((string)resp["success"] == "FALSE") | 298 | if ((string) resp["success"] == "FALSE") |
290 | { | 299 | { |
291 | responseSuccess = false; | 300 | responseSuccess = false; |
292 | tryDefault = true; | 301 | tryDefault = true; |
@@ -300,15 +309,18 @@ namespace OpenSim.Grid.UserServer | |||
300 | if (handlerUserLoggedInAtLocation != null) | 309 | if (handlerUserLoggedInAtLocation != null) |
301 | { | 310 | { |
302 | //m_log.Info("[LOGIN]: Letting other objects know about login"); | 311 | //m_log.Info("[LOGIN]: Letting other objects know about login"); |
303 | handlerUserLoggedInAtLocation(theUser.ID, theUser.CurrentAgent.SessionID, theUser.CurrentAgent.Region, | 312 | handlerUserLoggedInAtLocation(theUser.ID, theUser.CurrentAgent.SessionID, |
304 | theUser.CurrentAgent.Handle, theUser.CurrentAgent.Position.X, theUser.CurrentAgent.Position.Y, theUser.CurrentAgent.Position.Z, | 313 | theUser.CurrentAgent.Region, |
305 | theUser.FirstName, theUser.SurName); | 314 | theUser.CurrentAgent.Handle, theUser.CurrentAgent.Position.X, |
315 | theUser.CurrentAgent.Position.Y, | ||
316 | theUser.CurrentAgent.Position.Z, | ||
317 | theUser.FirstName, theUser.SurName); | ||
306 | } | 318 | } |
307 | } | 319 | } |
308 | } | 320 | } |
309 | } | 321 | } |
310 | catch (Exception) | 322 | catch (Exception) |
311 | //catch (System.AccessViolationException) | 323 | //catch (System.AccessViolationException) |
312 | { | 324 | { |
313 | tryDefault = true; | 325 | tryDefault = true; |
314 | } | 326 | } |
@@ -318,7 +330,8 @@ namespace OpenSim.Grid.UserServer | |||
318 | // Send him to default region instead | 330 | // Send him to default region instead |
319 | // Load information from the gridserver | 331 | // Load information from the gridserver |
320 | 332 | ||
321 | ulong defaultHandle = (((ulong)m_config.DefaultX * Constants.RegionSize) << 32) | ((ulong)m_config.DefaultY * Constants.RegionSize); | 333 | ulong defaultHandle = (((ulong) m_config.DefaultX*Constants.RegionSize) << 32) | |
334 | ((ulong) m_config.DefaultY*Constants.RegionSize); | ||
322 | 335 | ||
323 | m_log.Warn( | 336 | m_log.Warn( |
324 | "[LOGIN]: Home region not available: sending to default " + defaultHandle); | 337 | "[LOGIN]: Home region not available: sending to default " + defaultHandle); |
@@ -345,7 +358,7 @@ namespace OpenSim.Grid.UserServer | |||
345 | "CUSTOMISERESPONSE: Region X: " + SimInfo.regionLocX + "; Region Y: " + | 358 | "CUSTOMISERESPONSE: Region X: " + SimInfo.regionLocX + "; Region Y: " + |
346 | SimInfo.regionLocY); | 359 | SimInfo.regionLocY); |
347 | response.SimAddress = Util.GetHostFromURL(SimInfo.serverURI).ToString(); | 360 | response.SimAddress = Util.GetHostFromURL(SimInfo.serverURI).ToString(); |
348 | response.SimPort = uint.Parse(SimInfo.serverURI.Split(new char[] { '/', ':' })[4]); | 361 | response.SimPort = uint.Parse(SimInfo.serverURI.Split(new char[] {'/', ':'})[4]); |
349 | response.RegionX = SimInfo.regionLocX; | 362 | response.RegionX = SimInfo.regionLocX; |
350 | response.RegionY = SimInfo.regionLocY; | 363 | response.RegionY = SimInfo.regionLocY; |
351 | 364 | ||
@@ -391,7 +404,7 @@ namespace OpenSim.Grid.UserServer | |||
391 | Hashtable resp = (Hashtable) GridResp.Value; | 404 | Hashtable resp = (Hashtable) GridResp.Value; |
392 | if (resp.ContainsKey("success")) | 405 | if (resp.ContainsKey("success")) |
393 | { | 406 | { |
394 | if ((string)resp["success"] == "FALSE") | 407 | if ((string) resp["success"] == "FALSE") |
395 | { | 408 | { |
396 | responseSuccess = false; | 409 | responseSuccess = false; |
397 | } | 410 | } |
@@ -404,9 +417,13 @@ namespace OpenSim.Grid.UserServer | |||
404 | if (handlerUserLoggedInAtLocation != null) | 417 | if (handlerUserLoggedInAtLocation != null) |
405 | { | 418 | { |
406 | m_log.Info("[LOGIN]: Letting other objects know about login"); | 419 | m_log.Info("[LOGIN]: Letting other objects know about login"); |
407 | handlerUserLoggedInAtLocation(theUser.ID, theUser.CurrentAgent.SessionID, theUser.CurrentAgent.Region, | 420 | handlerUserLoggedInAtLocation(theUser.ID, theUser.CurrentAgent.SessionID, |
408 | theUser.CurrentAgent.Handle, theUser.CurrentAgent.Position.X, theUser.CurrentAgent.Position.Y, theUser.CurrentAgent.Position.Z, | 421 | theUser.CurrentAgent.Region, |
409 | theUser.FirstName, theUser.SurName); | 422 | theUser.CurrentAgent.Handle, |
423 | theUser.CurrentAgent.Position.X, | ||
424 | theUser.CurrentAgent.Position.Y, | ||
425 | theUser.CurrentAgent.Position.Z, | ||
426 | theUser.FirstName, theUser.SurName); | ||
410 | } | 427 | } |
411 | } | 428 | } |
412 | else | 429 | else |
@@ -432,8 +449,8 @@ namespace OpenSim.Grid.UserServer | |||
432 | protected override InventoryData GetInventorySkeleton(LLUUID userID) | 449 | protected override InventoryData GetInventorySkeleton(LLUUID userID) |
433 | { | 450 | { |
434 | m_log.DebugFormat( | 451 | m_log.DebugFormat( |
435 | "[LOGIN]: Contacting inventory service at {0} for inventory skeleton of user {1}", | 452 | "[LOGIN]: Contacting inventory service at {0} for inventory skeleton of user {1}", |
436 | m_config.InventoryUrl, userID); | 453 | m_config.InventoryUrl, userID); |
437 | 454 | ||
438 | List<InventoryFolderBase> folders = m_inventoryService.GetInventorySkeleton(userID); | 455 | List<InventoryFolderBase> folders = m_inventoryService.GetInventorySkeleton(userID); |
439 | 456 | ||
@@ -451,7 +468,7 @@ namespace OpenSim.Grid.UserServer | |||
451 | throw new Exception( | 468 | throw new Exception( |
452 | String.Format( | 469 | String.Format( |
453 | "The inventory creation request for user {0} did not succeed." | 470 | "The inventory creation request for user {0} did not succeed." |
454 | + " Please contact your inventory service provider for more information.", | 471 | + " Please contact your inventory service provider for more information.", |
455 | userID)); | 472 | userID)); |
456 | } | 473 | } |
457 | m_log.InfoFormat("[LOGIN]: A new inventory skeleton was successfully created for user {0}", userID); | 474 | m_log.InfoFormat("[LOGIN]: A new inventory skeleton was successfully created for user {0}", userID); |
@@ -490,4 +507,4 @@ namespace OpenSim.Grid.UserServer | |||
490 | userID)); | 507 | userID)); |
491 | } | 508 | } |
492 | } | 509 | } |
493 | } | 510 | } \ No newline at end of file |
diff --git a/OpenSim/Grid/UserServer/UserManager.cs b/OpenSim/Grid/UserServer/UserManager.cs index 760dfe3..69c550a 100644 --- a/OpenSim/Grid/UserServer/UserManager.cs +++ b/OpenSim/Grid/UserServer/UserManager.cs | |||
@@ -29,7 +29,6 @@ using System; | |||
29 | using System.Collections; | 29 | using System.Collections; |
30 | using System.Collections.Generic; | 30 | using System.Collections.Generic; |
31 | using System.Reflection; | 31 | using System.Reflection; |
32 | using System.Text.RegularExpressions; | ||
33 | using libsecondlife; | 32 | using libsecondlife; |
34 | using log4net; | 33 | using log4net; |
35 | using Nwc.XmlRpc; | 34 | using Nwc.XmlRpc; |
@@ -46,7 +45,7 @@ namespace OpenSim.Grid.UserServer | |||
46 | private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); | 45 | private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); |
47 | 46 | ||
48 | public event logOffUser OnLogOffUser; | 47 | public event logOffUser OnLogOffUser; |
49 | private logOffUser handlerLogOffUser = null; | 48 | private logOffUser handlerLogOffUser; |
50 | 49 | ||
51 | /// <summary> | 50 | /// <summary> |
52 | /// Deletes an active agent session | 51 | /// Deletes an active agent session |
@@ -85,14 +84,14 @@ namespace OpenSim.Grid.UserServer | |||
85 | XmlRpcResponse response = new XmlRpcResponse(); | 84 | XmlRpcResponse response = new XmlRpcResponse(); |
86 | Hashtable responseData = new Hashtable(); | 85 | Hashtable responseData = new Hashtable(); |
87 | // Query Result Information | 86 | // Query Result Information |
88 | responseData["queryid"] = (string) queryID.ToString(); | 87 | responseData["queryid"] = queryID.ToString(); |
89 | responseData["avcount"] = (string) returnUsers.Count.ToString(); | 88 | responseData["avcount"] = returnUsers.Count.ToString(); |
90 | 89 | ||
91 | for (int i = 0; i < returnUsers.Count; i++) | 90 | for (int i = 0; i < returnUsers.Count; i++) |
92 | { | 91 | { |
93 | responseData["avatarid" + i.ToString()] = returnUsers[i].AvatarID.ToString(); | 92 | responseData["avatarid" + i] = returnUsers[i].AvatarID.ToString(); |
94 | responseData["firstname" + i.ToString()] = returnUsers[i].firstName; | 93 | responseData["firstname" + i] = returnUsers[i].firstName; |
95 | responseData["lastname" + i.ToString()] = returnUsers[i].lastName; | 94 | responseData["lastname" + i] = returnUsers[i].lastName; |
96 | } | 95 | } |
97 | response.Value = responseData; | 96 | response.Value = responseData; |
98 | 97 | ||
@@ -105,14 +104,14 @@ namespace OpenSim.Grid.UserServer | |||
105 | Hashtable responseData = new Hashtable(); | 104 | Hashtable responseData = new Hashtable(); |
106 | // Query Result Information | 105 | // Query Result Information |
107 | 106 | ||
108 | responseData["avcount"] = (string)returnUsers.Count.ToString(); | 107 | responseData["avcount"] = returnUsers.Count.ToString(); |
109 | 108 | ||
110 | for (int i = 0; i < returnUsers.Count; i++) | 109 | for (int i = 0; i < returnUsers.Count; i++) |
111 | { | 110 | { |
112 | responseData["ownerID" + i.ToString()] = returnUsers[i].FriendListOwner.UUID.ToString(); | 111 | responseData["ownerID" + i] = returnUsers[i].FriendListOwner.UUID.ToString(); |
113 | responseData["friendID" + i.ToString()] = returnUsers[i].Friend.UUID.ToString(); | 112 | responseData["friendID" + i] = returnUsers[i].Friend.UUID.ToString(); |
114 | responseData["ownerPerms" + i.ToString()] = returnUsers[i].FriendListOwnerPerms.ToString(); | 113 | responseData["ownerPerms" + i] = returnUsers[i].FriendListOwnerPerms.ToString(); |
115 | responseData["friendPerms" + i.ToString()] = returnUsers[i].FriendPerms.ToString(); | 114 | responseData["friendPerms" + i] = returnUsers[i].FriendPerms.ToString(); |
116 | } | 115 | } |
117 | response.Value = responseData; | 116 | response.Value = responseData; |
118 | 117 | ||
@@ -159,7 +158,7 @@ namespace OpenSim.Grid.UserServer | |||
159 | 158 | ||
160 | responseData["user_flags"] = profile.UserFlags.ToString(); | 159 | responseData["user_flags"] = profile.UserFlags.ToString(); |
161 | responseData["god_level"] = profile.GodLevel.ToString(); | 160 | responseData["god_level"] = profile.GodLevel.ToString(); |
162 | responseData["custom_type"] = profile.CustomType.ToString(); | 161 | responseData["custom_type"] = profile.CustomType; |
163 | responseData["partner"] = profile.Partner.ToString(); | 162 | responseData["partner"] = profile.Partner.ToString(); |
164 | response.Value = responseData; | 163 | response.Value = responseData; |
165 | 164 | ||
@@ -188,24 +187,25 @@ namespace OpenSim.Grid.UserServer | |||
188 | public XmlRpcResponse XmlRPCAtRegion(XmlRpcRequest request) | 187 | public XmlRpcResponse XmlRPCAtRegion(XmlRpcRequest request) |
189 | { | 188 | { |
190 | XmlRpcResponse response = new XmlRpcResponse(); | 189 | XmlRpcResponse response = new XmlRpcResponse(); |
191 | Hashtable requestData = (Hashtable)request.Params[0]; | 190 | Hashtable requestData = (Hashtable) request.Params[0]; |
192 | Hashtable responseData = new Hashtable(); | 191 | Hashtable responseData = new Hashtable(); |
193 | string returnstring = "FALSE"; | 192 | string returnstring = "FALSE"; |
194 | 193 | ||
195 | if (requestData.Contains("avatar_id") && requestData.Contains("region_handle") && requestData.Contains("region_uuid")) | 194 | if (requestData.Contains("avatar_id") && requestData.Contains("region_handle") && |
195 | requestData.Contains("region_uuid")) | ||
196 | { | 196 | { |
197 | // ulong cregionhandle = 0; | 197 | // ulong cregionhandle = 0; |
198 | LLUUID regionUUID = LLUUID.Zero; | 198 | LLUUID regionUUID; |
199 | LLUUID avatarUUID = LLUUID.Zero; | 199 | LLUUID avatarUUID; |
200 | 200 | ||
201 | Helpers.TryParse((string)requestData["avatar_id"], out avatarUUID); | 201 | Helpers.TryParse((string) requestData["avatar_id"], out avatarUUID); |
202 | Helpers.TryParse((string)requestData["region_uuid"], out regionUUID); | 202 | Helpers.TryParse((string) requestData["region_uuid"], out regionUUID); |
203 | 203 | ||
204 | if (avatarUUID != LLUUID.Zero) | 204 | if (avatarUUID != LLUUID.Zero) |
205 | { | 205 | { |
206 | UserProfileData userProfile = GetUserProfile(avatarUUID); | 206 | UserProfileData userProfile = GetUserProfile(avatarUUID); |
207 | userProfile.CurrentAgent.Region = regionUUID; | 207 | userProfile.CurrentAgent.Region = regionUUID; |
208 | userProfile.CurrentAgent.Handle = (ulong)Convert.ToInt64((string)requestData["region_handle"]); | 208 | userProfile.CurrentAgent.Handle = (ulong) Convert.ToInt64((string) requestData["region_handle"]); |
209 | //userProfile.CurrentAgent. | 209 | //userProfile.CurrentAgent. |
210 | CommitAgent(ref userProfile); | 210 | CommitAgent(ref userProfile); |
211 | //setUserProfile(userProfile); | 211 | //setUserProfile(userProfile); |
@@ -213,7 +213,6 @@ namespace OpenSim.Grid.UserServer | |||
213 | 213 | ||
214 | returnstring = "TRUE"; | 214 | returnstring = "TRUE"; |
215 | } | 215 | } |
216 | |||
217 | } | 216 | } |
218 | responseData.Add("returnString", returnstring); | 217 | responseData.Add("returnString", returnstring); |
219 | response.Value = responseData; | 218 | response.Value = responseData; |
@@ -223,15 +222,18 @@ namespace OpenSim.Grid.UserServer | |||
223 | public XmlRpcResponse XmlRpcResponseXmlRPCAddUserFriend(XmlRpcRequest request) | 222 | public XmlRpcResponse XmlRpcResponseXmlRPCAddUserFriend(XmlRpcRequest request) |
224 | { | 223 | { |
225 | XmlRpcResponse response = new XmlRpcResponse(); | 224 | XmlRpcResponse response = new XmlRpcResponse(); |
226 | Hashtable requestData = (Hashtable)request.Params[0]; | 225 | Hashtable requestData = (Hashtable) request.Params[0]; |
227 | Hashtable responseData = new Hashtable(); | 226 | Hashtable responseData = new Hashtable(); |
228 | string returnString = "FALSE"; | 227 | string returnString = "FALSE"; |
229 | // Query Result Information | 228 | // Query Result Information |
230 | 229 | ||
231 | if (requestData.Contains("ownerID") && requestData.Contains("friendID") && requestData.Contains("friendPerms")) | 230 | if (requestData.Contains("ownerID") && requestData.Contains("friendID") && |
231 | requestData.Contains("friendPerms")) | ||
232 | { | 232 | { |
233 | // UserManagerBase.AddNewuserFriend | 233 | // UserManagerBase.AddNewuserFriend |
234 | AddNewUserFriend(new LLUUID((string)requestData["ownerID"]), new LLUUID((string)requestData["friendID"]), (uint)Convert.ToInt32((string)requestData["friendPerms"])); | 234 | AddNewUserFriend(new LLUUID((string) requestData["ownerID"]), |
235 | new LLUUID((string) requestData["friendID"]), | ||
236 | (uint) Convert.ToInt32((string) requestData["friendPerms"])); | ||
235 | returnString = "TRUE"; | 237 | returnString = "TRUE"; |
236 | } | 238 | } |
237 | responseData["returnString"] = returnString; | 239 | responseData["returnString"] = returnString; |
@@ -242,7 +244,7 @@ namespace OpenSim.Grid.UserServer | |||
242 | public XmlRpcResponse XmlRpcResponseXmlRPCRemoveUserFriend(XmlRpcRequest request) | 244 | public XmlRpcResponse XmlRpcResponseXmlRPCRemoveUserFriend(XmlRpcRequest request) |
243 | { | 245 | { |
244 | XmlRpcResponse response = new XmlRpcResponse(); | 246 | XmlRpcResponse response = new XmlRpcResponse(); |
245 | Hashtable requestData = (Hashtable)request.Params[0]; | 247 | Hashtable requestData = (Hashtable) request.Params[0]; |
246 | Hashtable responseData = new Hashtable(); | 248 | Hashtable responseData = new Hashtable(); |
247 | string returnString = "FALSE"; | 249 | string returnString = "FALSE"; |
248 | // Query Result Information | 250 | // Query Result Information |
@@ -250,7 +252,8 @@ namespace OpenSim.Grid.UserServer | |||
250 | if (requestData.Contains("ownerID") && requestData.Contains("friendID")) | 252 | if (requestData.Contains("ownerID") && requestData.Contains("friendID")) |
251 | { | 253 | { |
252 | // UserManagerBase.AddNewuserFriend | 254 | // UserManagerBase.AddNewuserFriend |
253 | RemoveUserFriend(new LLUUID((string)requestData["ownerID"]), new LLUUID((string)requestData["friendID"])); | 255 | RemoveUserFriend(new LLUUID((string) requestData["ownerID"]), |
256 | new LLUUID((string) requestData["friendID"])); | ||
254 | returnString = "TRUE"; | 257 | returnString = "TRUE"; |
255 | } | 258 | } |
256 | responseData["returnString"] = returnString; | 259 | responseData["returnString"] = returnString; |
@@ -261,13 +264,16 @@ namespace OpenSim.Grid.UserServer | |||
261 | public XmlRpcResponse XmlRpcResponseXmlRPCUpdateUserFriendPerms(XmlRpcRequest request) | 264 | public XmlRpcResponse XmlRpcResponseXmlRPCUpdateUserFriendPerms(XmlRpcRequest request) |
262 | { | 265 | { |
263 | XmlRpcResponse response = new XmlRpcResponse(); | 266 | XmlRpcResponse response = new XmlRpcResponse(); |
264 | Hashtable requestData = (Hashtable)request.Params[0]; | 267 | Hashtable requestData = (Hashtable) request.Params[0]; |
265 | Hashtable responseData = new Hashtable(); | 268 | Hashtable responseData = new Hashtable(); |
266 | string returnString = "FALSE"; | 269 | string returnString = "FALSE"; |
267 | 270 | ||
268 | if (requestData.Contains("ownerID") && requestData.Contains("friendID") && requestData.Contains("friendPerms")) | 271 | if (requestData.Contains("ownerID") && requestData.Contains("friendID") && |
272 | requestData.Contains("friendPerms")) | ||
269 | { | 273 | { |
270 | UpdateUserFriendPerms(new LLUUID((string)requestData["ownerID"]), new LLUUID((string)requestData["friendID"]), (uint)Convert.ToInt32((string)requestData["friendPerms"])); | 274 | UpdateUserFriendPerms(new LLUUID((string) requestData["ownerID"]), |
275 | new LLUUID((string) requestData["friendID"]), | ||
276 | (uint) Convert.ToInt32((string) requestData["friendPerms"])); | ||
271 | // UserManagerBase. | 277 | // UserManagerBase. |
272 | returnString = "TRUE"; | 278 | returnString = "TRUE"; |
273 | } | 279 | } |
@@ -279,14 +285,14 @@ namespace OpenSim.Grid.UserServer | |||
279 | public XmlRpcResponse XmlRpcResponseXmlRPCGetUserFriendList(XmlRpcRequest request) | 285 | public XmlRpcResponse XmlRpcResponseXmlRPCGetUserFriendList(XmlRpcRequest request) |
280 | { | 286 | { |
281 | // XmlRpcResponse response = new XmlRpcResponse(); | 287 | // XmlRpcResponse response = new XmlRpcResponse(); |
282 | Hashtable requestData = (Hashtable)request.Params[0]; | 288 | Hashtable requestData = (Hashtable) request.Params[0]; |
283 | // Hashtable responseData = new Hashtable(); | 289 | // Hashtable responseData = new Hashtable(); |
284 | 290 | ||
285 | List<FriendListItem> returndata = new List<FriendListItem>(); | 291 | List<FriendListItem> returndata = new List<FriendListItem>(); |
286 | 292 | ||
287 | if (requestData.Contains("ownerID")) | 293 | if (requestData.Contains("ownerID")) |
288 | { | 294 | { |
289 | returndata = this.GetUserFriendList(new LLUUID((string)requestData["ownerID"])); | 295 | returndata = GetUserFriendList(new LLUUID((string) requestData["ownerID"])); |
290 | } | 296 | } |
291 | 297 | ||
292 | return FriendListItemListtoXmlRPCResponse(returndata); | 298 | return FriendListItemListtoXmlRPCResponse(returndata); |
@@ -295,12 +301,12 @@ namespace OpenSim.Grid.UserServer | |||
295 | public XmlRpcResponse XmlRPCGetAvatarAppearance(XmlRpcRequest request) | 301 | public XmlRpcResponse XmlRPCGetAvatarAppearance(XmlRpcRequest request) |
296 | { | 302 | { |
297 | XmlRpcResponse response = new XmlRpcResponse(); | 303 | XmlRpcResponse response = new XmlRpcResponse(); |
298 | Hashtable requestData = (Hashtable)request.Params[0]; | 304 | Hashtable requestData = (Hashtable) request.Params[0]; |
299 | AvatarAppearance appearance = null; | 305 | AvatarAppearance appearance; |
300 | Hashtable responseData = null; | 306 | Hashtable responseData; |
301 | if (requestData.Contains("owner")) | 307 | if (requestData.Contains("owner")) |
302 | { | 308 | { |
303 | appearance = GetUserAppearance(new LLUUID((string)requestData["owner"])); | 309 | appearance = GetUserAppearance(new LLUUID((string) requestData["owner"])); |
304 | if (appearance == null) | 310 | if (appearance == null) |
305 | { | 311 | { |
306 | responseData = new Hashtable(); | 312 | responseData = new Hashtable(); |
@@ -326,12 +332,12 @@ namespace OpenSim.Grid.UserServer | |||
326 | public XmlRpcResponse XmlRPCUpdateAvatarAppearance(XmlRpcRequest request) | 332 | public XmlRpcResponse XmlRPCUpdateAvatarAppearance(XmlRpcRequest request) |
327 | { | 333 | { |
328 | XmlRpcResponse response = new XmlRpcResponse(); | 334 | XmlRpcResponse response = new XmlRpcResponse(); |
329 | Hashtable requestData = (Hashtable)request.Params[0]; | 335 | Hashtable requestData = (Hashtable) request.Params[0]; |
330 | Hashtable responseData = null; | 336 | Hashtable responseData; |
331 | if (requestData.Contains("owner")) | 337 | if (requestData.Contains("owner")) |
332 | { | 338 | { |
333 | AvatarAppearance appearance = new AvatarAppearance(requestData); | 339 | AvatarAppearance appearance = new AvatarAppearance(requestData); |
334 | UpdateUserAppearance(new LLUUID((string)requestData["owner"]), appearance); | 340 | UpdateUserAppearance(new LLUUID((string) requestData["owner"]), appearance); |
335 | responseData = new Hashtable(); | 341 | responseData = new Hashtable(); |
336 | responseData["returnString"] = "TRUE"; | 342 | responseData["returnString"] = "TRUE"; |
337 | } | 343 | } |
@@ -356,8 +362,7 @@ namespace OpenSim.Grid.UserServer | |||
356 | 362 | ||
357 | // Regex objAlphaNumericPattern = new Regex("[^a-zA-Z0-9]"); | 363 | // Regex objAlphaNumericPattern = new Regex("[^a-zA-Z0-9]"); |
358 | 364 | ||
359 | string[] querysplit; | 365 | string[] querysplit = query.Split(' '); |
360 | querysplit = query.Split(' '); | ||
361 | 366 | ||
362 | if (querysplit.Length == 2) | 367 | if (querysplit.Length == 2) |
363 | { | 368 | { |
@@ -389,10 +394,9 @@ namespace OpenSim.Grid.UserServer | |||
389 | //CFK: Console.WriteLine("METHOD BY UUID CALLED"); | 394 | //CFK: Console.WriteLine("METHOD BY UUID CALLED"); |
390 | if (requestData.Contains("avatar_uuid")) | 395 | if (requestData.Contains("avatar_uuid")) |
391 | { | 396 | { |
392 | LLUUID guess = new LLUUID(); | ||
393 | try | 397 | try |
394 | { | 398 | { |
395 | guess = new LLUUID((string) requestData["avatar_uuid"]); | 399 | LLUUID guess = new LLUUID((string) requestData["avatar_uuid"]); |
396 | 400 | ||
397 | userProfile = GetUserProfile(guess); | 401 | userProfile = GetUserProfile(guess); |
398 | } | 402 | } |
@@ -417,15 +421,15 @@ namespace OpenSim.Grid.UserServer | |||
417 | public XmlRpcResponse XmlRPCGetAgentMethodUUID(XmlRpcRequest request) | 421 | public XmlRpcResponse XmlRPCGetAgentMethodUUID(XmlRpcRequest request) |
418 | { | 422 | { |
419 | XmlRpcResponse response = new XmlRpcResponse(); | 423 | XmlRpcResponse response = new XmlRpcResponse(); |
420 | Hashtable requestData = (Hashtable)request.Params[0]; | 424 | Hashtable requestData = (Hashtable) request.Params[0]; |
421 | UserProfileData userProfile; | 425 | UserProfileData userProfile; |
422 | //CFK: this clogs the UserServer log and is not necessary at this time. | 426 | //CFK: this clogs the UserServer log and is not necessary at this time. |
423 | //CFK: Console.WriteLine("METHOD BY UUID CALLED"); | 427 | //CFK: Console.WriteLine("METHOD BY UUID CALLED"); |
424 | if (requestData.Contains("avatar_uuid")) | 428 | if (requestData.Contains("avatar_uuid")) |
425 | { | 429 | { |
426 | LLUUID guess = LLUUID.Zero; | 430 | LLUUID guess; |
427 | 431 | ||
428 | Helpers.TryParse((string)requestData["avatar_uuid"],out guess); | 432 | Helpers.TryParse((string) requestData["avatar_uuid"], out guess); |
429 | 433 | ||
430 | if (guess == LLUUID.Zero) | 434 | if (guess == LLUUID.Zero) |
431 | { | 435 | { |
@@ -446,12 +450,12 @@ namespace OpenSim.Grid.UserServer | |||
446 | } | 450 | } |
447 | Hashtable responseData = new Hashtable(); | 451 | Hashtable responseData = new Hashtable(); |
448 | 452 | ||
449 | responseData["handle"]=userProfile.CurrentAgent.Handle.ToString(); | 453 | responseData["handle"] = userProfile.CurrentAgent.Handle.ToString(); |
450 | responseData["session"]=userProfile.CurrentAgent.SessionID.ToString(); | 454 | responseData["session"] = userProfile.CurrentAgent.SessionID.ToString(); |
451 | if (userProfile.CurrentAgent.AgentOnline) | 455 | if (userProfile.CurrentAgent.AgentOnline) |
452 | responseData["agent_online"]="TRUE"; | 456 | responseData["agent_online"] = "TRUE"; |
453 | else | 457 | else |
454 | responseData["agent_online"]="FALSE"; | 458 | responseData["agent_online"] = "FALSE"; |
455 | 459 | ||
456 | response.Value = responseData; | 460 | response.Value = responseData; |
457 | } | 461 | } |
@@ -466,27 +470,28 @@ namespace OpenSim.Grid.UserServer | |||
466 | public XmlRpcResponse XmlRPCCheckAuthSession(XmlRpcRequest request) | 470 | public XmlRpcResponse XmlRPCCheckAuthSession(XmlRpcRequest request) |
467 | { | 471 | { |
468 | XmlRpcResponse response = new XmlRpcResponse(); | 472 | XmlRpcResponse response = new XmlRpcResponse(); |
469 | Hashtable requestData = (Hashtable)request.Params[0]; | 473 | Hashtable requestData = (Hashtable) request.Params[0]; |
470 | UserProfileData userProfile; | 474 | UserProfileData userProfile; |
471 | 475 | ||
472 | string authed = "FALSE"; | 476 | string authed = "FALSE"; |
473 | if (requestData.Contains("avatar_uuid") && requestData.Contains("session_id")) | 477 | if (requestData.Contains("avatar_uuid") && requestData.Contains("session_id")) |
474 | { | 478 | { |
475 | LLUUID guess_aid = LLUUID.Zero; | 479 | LLUUID guess_aid; |
476 | LLUUID guess_sid = LLUUID.Zero; | 480 | LLUUID guess_sid; |
477 | 481 | ||
478 | Helpers.TryParse((string)requestData["avatar_uuid"], out guess_aid); | 482 | Helpers.TryParse((string) requestData["avatar_uuid"], out guess_aid); |
479 | if (guess_aid == LLUUID.Zero) | 483 | if (guess_aid == LLUUID.Zero) |
480 | { | 484 | { |
481 | return CreateUnknownUserErrorResponse(); | 485 | return CreateUnknownUserErrorResponse(); |
482 | } | 486 | } |
483 | Helpers.TryParse((string)requestData["session_id"], out guess_sid); | 487 | Helpers.TryParse((string) requestData["session_id"], out guess_sid); |
484 | if (guess_sid == LLUUID.Zero) | 488 | if (guess_sid == LLUUID.Zero) |
485 | { | 489 | { |
486 | return CreateUnknownUserErrorResponse(); | 490 | return CreateUnknownUserErrorResponse(); |
487 | } | 491 | } |
488 | userProfile = GetUserProfile(guess_aid); | 492 | userProfile = GetUserProfile(guess_aid); |
489 | if (userProfile != null && userProfile.CurrentAgent != null && userProfile.CurrentAgent.SessionID == guess_sid) | 493 | if (userProfile != null && userProfile.CurrentAgent != null && |
494 | userProfile.CurrentAgent.SessionID == guess_sid) | ||
490 | { | 495 | { |
491 | authed = "TRUE"; | 496 | authed = "TRUE"; |
492 | } | 497 | } |
@@ -507,17 +512,16 @@ namespace OpenSim.Grid.UserServer | |||
507 | { | 512 | { |
508 | m_log.Debug("[UserManager]: Got request to update user profile"); | 513 | m_log.Debug("[UserManager]: Got request to update user profile"); |
509 | XmlRpcResponse response = new XmlRpcResponse(); | 514 | XmlRpcResponse response = new XmlRpcResponse(); |
510 | Hashtable requestData = (Hashtable)request.Params[0]; | 515 | Hashtable requestData = (Hashtable) request.Params[0]; |
511 | Hashtable responseData = new Hashtable(); | 516 | Hashtable responseData = new Hashtable(); |
512 | 517 | ||
513 | UserProfileData userProfile; | ||
514 | if (!requestData.Contains("avatar_uuid")) | 518 | if (!requestData.Contains("avatar_uuid")) |
515 | { | 519 | { |
516 | return CreateUnknownUserErrorResponse(); | 520 | return CreateUnknownUserErrorResponse(); |
517 | } | 521 | } |
518 | 522 | ||
519 | LLUUID UserUUID = new LLUUID((string)requestData["avatar_uuid"]); | 523 | LLUUID UserUUID = new LLUUID((string) requestData["avatar_uuid"]); |
520 | userProfile = GetUserProfile(UserUUID); | 524 | UserProfileData userProfile = GetUserProfile(UserUUID); |
521 | if (null == userProfile) | 525 | if (null == userProfile) |
522 | { | 526 | { |
523 | return CreateUnknownUserErrorResponse(); | 527 | return CreateUnknownUserErrorResponse(); |
@@ -528,11 +532,11 @@ namespace OpenSim.Grid.UserServer | |||
528 | } | 532 | } |
529 | if (requestData.Contains("FLImageID")) | 533 | if (requestData.Contains("FLImageID")) |
530 | { | 534 | { |
531 | userProfile.FirstLifeImage = new LLUUID((string)requestData["FLImageID"]); | 535 | userProfile.FirstLifeImage = new LLUUID((string) requestData["FLImageID"]); |
532 | } | 536 | } |
533 | if (requestData.Contains("ImageID")) | 537 | if (requestData.Contains("ImageID")) |
534 | { | 538 | { |
535 | userProfile.Image = new LLUUID((string)requestData["ImageID"]); | 539 | userProfile.Image = new LLUUID((string) requestData["ImageID"]); |
536 | } | 540 | } |
537 | // dont' know how yet | 541 | // dont' know how yet |
538 | if (requestData.Contains("MaturePublish")) | 542 | if (requestData.Contains("MaturePublish")) |
@@ -540,11 +544,11 @@ namespace OpenSim.Grid.UserServer | |||
540 | } | 544 | } |
541 | if (requestData.Contains("AboutText")) | 545 | if (requestData.Contains("AboutText")) |
542 | { | 546 | { |
543 | userProfile.AboutText = (string)requestData["AboutText"]; | 547 | userProfile.AboutText = (string) requestData["AboutText"]; |
544 | } | 548 | } |
545 | if (requestData.Contains("FLAboutText")) | 549 | if (requestData.Contains("FLAboutText")) |
546 | { | 550 | { |
547 | userProfile.FirstLifeAboutText = (string)requestData["FLAboutText"]; | 551 | userProfile.FirstLifeAboutText = (string) requestData["FLAboutText"]; |
548 | } | 552 | } |
549 | // not in DB yet. | 553 | // not in DB yet. |
550 | if (requestData.Contains("ProfileURL")) | 554 | if (requestData.Contains("ProfileURL")) |
@@ -554,7 +558,7 @@ namespace OpenSim.Grid.UserServer | |||
554 | { | 558 | { |
555 | try | 559 | try |
556 | { | 560 | { |
557 | userProfile.HomeRegion = Convert.ToUInt64((string)requestData["home_region"]); | 561 | userProfile.HomeRegion = Convert.ToUInt64((string) requestData["home_region"]); |
558 | } | 562 | } |
559 | catch (ArgumentException) | 563 | catch (ArgumentException) |
560 | { | 564 | { |
@@ -568,31 +572,29 @@ namespace OpenSim.Grid.UserServer | |||
568 | { | 572 | { |
569 | m_log.Error("[PROFILE]:Failed to set home region, Value was too large"); | 573 | m_log.Error("[PROFILE]:Failed to set home region, Value was too large"); |
570 | } | 574 | } |
571 | |||
572 | } | 575 | } |
573 | if (requestData.Contains("home_region_id")) | 576 | if (requestData.Contains("home_region_id")) |
574 | { | 577 | { |
575 | LLUUID regionID = LLUUID.Zero; | 578 | LLUUID regionID; |
576 | LLUUID.TryParse((string)requestData["home_region_id"], out regionID); | 579 | LLUUID.TryParse((string) requestData["home_region_id"], out regionID); |
577 | userProfile.HomeRegionID = regionID; | 580 | userProfile.HomeRegionID = regionID; |
578 | } | 581 | } |
579 | if (requestData.Contains("home_pos_x")) | 582 | if (requestData.Contains("home_pos_x")) |
580 | { | 583 | { |
581 | try | 584 | try |
582 | { | 585 | { |
583 | userProfile.HomeLocationX = (float)Convert.ToDecimal((string)requestData["home_pos_x"]); | 586 | userProfile.HomeLocationX = (float) Convert.ToDecimal((string) requestData["home_pos_x"]); |
584 | } | 587 | } |
585 | catch (InvalidCastException) | 588 | catch (InvalidCastException) |
586 | { | 589 | { |
587 | m_log.Error("[PROFILE]:Failed to set home postion x"); | 590 | m_log.Error("[PROFILE]:Failed to set home postion x"); |
588 | } | 591 | } |
589 | |||
590 | } | 592 | } |
591 | if (requestData.Contains("home_pos_y")) | 593 | if (requestData.Contains("home_pos_y")) |
592 | { | 594 | { |
593 | try | 595 | try |
594 | { | 596 | { |
595 | userProfile.HomeLocationY = (float)Convert.ToDecimal((string)requestData["home_pos_y"]); | 597 | userProfile.HomeLocationY = (float) Convert.ToDecimal((string) requestData["home_pos_y"]); |
596 | } | 598 | } |
597 | catch (InvalidCastException) | 599 | catch (InvalidCastException) |
598 | { | 600 | { |
@@ -603,7 +605,7 @@ namespace OpenSim.Grid.UserServer | |||
603 | { | 605 | { |
604 | try | 606 | try |
605 | { | 607 | { |
606 | userProfile.HomeLocationZ = (float)Convert.ToDecimal((string)requestData["home_pos_z"]); | 608 | userProfile.HomeLocationZ = (float) Convert.ToDecimal((string) requestData["home_pos_z"]); |
607 | } | 609 | } |
608 | catch (InvalidCastException) | 610 | catch (InvalidCastException) |
609 | { | 611 | { |
@@ -614,7 +616,7 @@ namespace OpenSim.Grid.UserServer | |||
614 | { | 616 | { |
615 | try | 617 | try |
616 | { | 618 | { |
617 | userProfile.HomeLookAtX = (float)Convert.ToDecimal((string)requestData["home_look_x"]); | 619 | userProfile.HomeLookAtX = (float) Convert.ToDecimal((string) requestData["home_look_x"]); |
618 | } | 620 | } |
619 | catch (InvalidCastException) | 621 | catch (InvalidCastException) |
620 | { | 622 | { |
@@ -625,7 +627,7 @@ namespace OpenSim.Grid.UserServer | |||
625 | { | 627 | { |
626 | try | 628 | try |
627 | { | 629 | { |
628 | userProfile.HomeLookAtY = (float)Convert.ToDecimal((string)requestData["home_look_y"]); | 630 | userProfile.HomeLookAtY = (float) Convert.ToDecimal((string) requestData["home_look_y"]); |
629 | } | 631 | } |
630 | catch (InvalidCastException) | 632 | catch (InvalidCastException) |
631 | { | 633 | { |
@@ -636,7 +638,7 @@ namespace OpenSim.Grid.UserServer | |||
636 | { | 638 | { |
637 | try | 639 | try |
638 | { | 640 | { |
639 | userProfile.HomeLookAtZ = (float)Convert.ToDecimal((string)requestData["home_look_z"]); | 641 | userProfile.HomeLookAtZ = (float) Convert.ToDecimal((string) requestData["home_look_z"]); |
640 | } | 642 | } |
641 | catch (InvalidCastException) | 643 | catch (InvalidCastException) |
642 | { | 644 | { |
@@ -647,7 +649,7 @@ namespace OpenSim.Grid.UserServer | |||
647 | { | 649 | { |
648 | try | 650 | try |
649 | { | 651 | { |
650 | userProfile.UserFlags = Convert.ToInt32((string)requestData["user_flags"]); | 652 | userProfile.UserFlags = Convert.ToInt32((string) requestData["user_flags"]); |
651 | } | 653 | } |
652 | catch (InvalidCastException) | 654 | catch (InvalidCastException) |
653 | { | 655 | { |
@@ -658,7 +660,7 @@ namespace OpenSim.Grid.UserServer | |||
658 | { | 660 | { |
659 | try | 661 | try |
660 | { | 662 | { |
661 | userProfile.GodLevel = Convert.ToInt32((string)requestData["god_level"]); | 663 | userProfile.GodLevel = Convert.ToInt32((string) requestData["god_level"]); |
662 | } | 664 | } |
663 | catch (InvalidCastException) | 665 | catch (InvalidCastException) |
664 | { | 666 | { |
@@ -669,7 +671,7 @@ namespace OpenSim.Grid.UserServer | |||
669 | { | 671 | { |
670 | try | 672 | try |
671 | { | 673 | { |
672 | userProfile.CustomType = (string)requestData["custom_type"]; | 674 | userProfile.CustomType = (string) requestData["custom_type"]; |
673 | } | 675 | } |
674 | catch (InvalidCastException) | 676 | catch (InvalidCastException) |
675 | { | 677 | { |
@@ -680,7 +682,7 @@ namespace OpenSim.Grid.UserServer | |||
680 | { | 682 | { |
681 | try | 683 | try |
682 | { | 684 | { |
683 | userProfile.Partner = new LLUUID((string)requestData["partner"]); | 685 | userProfile.Partner = new LLUUID((string) requestData["partner"]); |
684 | } | 686 | } |
685 | catch (InvalidCastException) | 687 | catch (InvalidCastException) |
686 | { | 688 | { |
@@ -689,7 +691,7 @@ namespace OpenSim.Grid.UserServer | |||
689 | } | 691 | } |
690 | else | 692 | else |
691 | { | 693 | { |
692 | userProfile.Partner = LLUUID.Zero; | 694 | userProfile.Partner = LLUUID.Zero; |
693 | } | 695 | } |
694 | 696 | ||
695 | // call plugin! | 697 | // call plugin! |
@@ -702,18 +704,18 @@ namespace OpenSim.Grid.UserServer | |||
702 | public XmlRpcResponse XmlRPCLogOffUserMethodUUID(XmlRpcRequest request) | 704 | public XmlRpcResponse XmlRPCLogOffUserMethodUUID(XmlRpcRequest request) |
703 | { | 705 | { |
704 | XmlRpcResponse response = new XmlRpcResponse(); | 706 | XmlRpcResponse response = new XmlRpcResponse(); |
705 | Hashtable requestData = (Hashtable)request.Params[0]; | 707 | Hashtable requestData = (Hashtable) request.Params[0]; |
706 | 708 | ||
707 | if (requestData.Contains("avatar_uuid")) | 709 | if (requestData.Contains("avatar_uuid")) |
708 | { | 710 | { |
709 | try | 711 | try |
710 | { | 712 | { |
711 | LLUUID userUUID = new LLUUID((string)requestData["avatar_uuid"]); | 713 | LLUUID userUUID = new LLUUID((string) requestData["avatar_uuid"]); |
712 | LLUUID RegionID = new LLUUID((string)requestData["region_uuid"]); | 714 | LLUUID RegionID = new LLUUID((string) requestData["region_uuid"]); |
713 | ulong regionhandle = (ulong)Convert.ToInt64((string)requestData["region_handle"]); | 715 | ulong regionhandle = (ulong) Convert.ToInt64((string) requestData["region_handle"]); |
714 | float posx = (float)Convert.ToDecimal((string)requestData["region_pos_x"]); | 716 | float posx = (float) Convert.ToDecimal((string) requestData["region_pos_x"]); |
715 | float posy = (float)Convert.ToDecimal((string)requestData["region_pos_y"]); | 717 | float posy = (float) Convert.ToDecimal((string) requestData["region_pos_y"]); |
716 | float posz = (float)Convert.ToDecimal((string)requestData["region_pos_z"]); | 718 | float posz = (float) Convert.ToDecimal((string) requestData["region_pos_z"]); |
717 | 719 | ||
718 | handlerLogOffUser = OnLogOffUser; | 720 | handlerLogOffUser = OnLogOffUser; |
719 | if (handlerLogOffUser != null) | 721 | if (handlerLogOffUser != null) |
@@ -752,4 +754,4 @@ namespace OpenSim.Grid.UserServer | |||
752 | throw new Exception("The method or operation is not implemented."); | 754 | throw new Exception("The method or operation is not implemented."); |
753 | } | 755 | } |
754 | } | 756 | } |
755 | } | 757 | } \ No newline at end of file |