aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Grid/UserServer/UserManager.cs
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Grid/UserServer/UserManager.cs')
-rw-r--r--OpenSim/Grid/UserServer/UserManager.cs84
1 files changed, 42 insertions, 42 deletions
diff --git a/OpenSim/Grid/UserServer/UserManager.cs b/OpenSim/Grid/UserServer/UserManager.cs
index 69c550a..4b5f5a0 100644
--- a/OpenSim/Grid/UserServer/UserManager.cs
+++ b/OpenSim/Grid/UserServer/UserManager.cs
@@ -29,7 +29,7 @@ using System;
29using System.Collections; 29using System.Collections;
30using System.Collections.Generic; 30using System.Collections.Generic;
31using System.Reflection; 31using System.Reflection;
32using libsecondlife; 32using OpenMetaverse;
33using log4net; 33using log4net;
34using Nwc.XmlRpc; 34using Nwc.XmlRpc;
35using OpenSim.Framework; 35using OpenSim.Framework;
@@ -38,7 +38,7 @@ using OpenSim.Framework.Servers;
38 38
39namespace OpenSim.Grid.UserServer 39namespace OpenSim.Grid.UserServer
40{ 40{
41 public delegate void logOffUser(LLUUID AgentID); 41 public delegate void logOffUser(UUID AgentID);
42 42
43 public class UserManager : UserManagerBase 43 public class UserManager : UserManagerBase
44 { 44 {
@@ -79,7 +79,7 @@ namespace OpenSim.Grid.UserServer
79 return response; 79 return response;
80 } 80 }
81 81
82 public XmlRpcResponse AvatarPickerListtoXmlRPCResponse(LLUUID queryID, List<AvatarPickerAvatar> returnUsers) 82 public XmlRpcResponse AvatarPickerListtoXmlRPCResponse(UUID queryID, List<AvatarPickerAvatar> returnUsers)
83 { 83 {
84 XmlRpcResponse response = new XmlRpcResponse(); 84 XmlRpcResponse response = new XmlRpcResponse();
85 Hashtable responseData = new Hashtable(); 85 Hashtable responseData = new Hashtable();
@@ -108,8 +108,8 @@ namespace OpenSim.Grid.UserServer
108 108
109 for (int i = 0; i < returnUsers.Count; i++) 109 for (int i = 0; i < returnUsers.Count; i++)
110 { 110 {
111 responseData["ownerID" + i] = returnUsers[i].FriendListOwner.UUID.ToString(); 111 responseData["ownerID" + i] = returnUsers[i].FriendListOwner.ToString();
112 responseData["friendID" + i] = returnUsers[i].Friend.UUID.ToString(); 112 responseData["friendID" + i] = returnUsers[i].Friend.ToString();
113 responseData["ownerPerms" + i] = returnUsers[i].FriendListOwnerPerms.ToString(); 113 responseData["ownerPerms" + i] = returnUsers[i].FriendListOwnerPerms.ToString();
114 responseData["friendPerms" + i] = returnUsers[i].FriendPerms.ToString(); 114 responseData["friendPerms" + i] = returnUsers[i].FriendPerms.ToString();
115 } 115 }
@@ -172,11 +172,11 @@ namespace OpenSim.Grid.UserServer
172 // XmlRpcResponse response = new XmlRpcResponse(); 172 // XmlRpcResponse response = new XmlRpcResponse();
173 Hashtable requestData = (Hashtable) request.Params[0]; 173 Hashtable requestData = (Hashtable) request.Params[0];
174 List<AvatarPickerAvatar> returnAvatar = new List<AvatarPickerAvatar>(); 174 List<AvatarPickerAvatar> returnAvatar = new List<AvatarPickerAvatar>();
175 LLUUID queryID = new LLUUID(LLUUID.Zero.ToString()); 175 UUID queryID = new UUID(UUID.Zero.ToString());
176 176
177 if (requestData.Contains("avquery") && requestData.Contains("queryid")) 177 if (requestData.Contains("avquery") && requestData.Contains("queryid"))
178 { 178 {
179 queryID = new LLUUID((string) requestData["queryid"]); 179 queryID = new UUID((string) requestData["queryid"]);
180 returnAvatar = GenerateAgentPickerRequestResponse(queryID, (string) requestData["avquery"]); 180 returnAvatar = GenerateAgentPickerRequestResponse(queryID, (string) requestData["avquery"]);
181 } 181 }
182 182
@@ -195,13 +195,13 @@ namespace OpenSim.Grid.UserServer
195 requestData.Contains("region_uuid")) 195 requestData.Contains("region_uuid"))
196 { 196 {
197 // ulong cregionhandle = 0; 197 // ulong cregionhandle = 0;
198 LLUUID regionUUID; 198 UUID regionUUID;
199 LLUUID avatarUUID; 199 UUID avatarUUID;
200 200
201 Helpers.TryParse((string) requestData["avatar_id"], out avatarUUID); 201 UUID.TryParse((string) requestData["avatar_id"], out avatarUUID);
202 Helpers.TryParse((string) requestData["region_uuid"], out regionUUID); 202 UUID.TryParse((string) requestData["region_uuid"], out regionUUID);
203 203
204 if (avatarUUID != LLUUID.Zero) 204 if (avatarUUID != UUID.Zero)
205 { 205 {
206 UserProfileData userProfile = GetUserProfile(avatarUUID); 206 UserProfileData userProfile = GetUserProfile(avatarUUID);
207 userProfile.CurrentAgent.Region = regionUUID; 207 userProfile.CurrentAgent.Region = regionUUID;
@@ -231,8 +231,8 @@ namespace OpenSim.Grid.UserServer
231 requestData.Contains("friendPerms")) 231 requestData.Contains("friendPerms"))
232 { 232 {
233 // UserManagerBase.AddNewuserFriend 233 // UserManagerBase.AddNewuserFriend
234 AddNewUserFriend(new LLUUID((string) requestData["ownerID"]), 234 AddNewUserFriend(new UUID((string) requestData["ownerID"]),
235 new LLUUID((string) requestData["friendID"]), 235 new UUID((string) requestData["friendID"]),
236 (uint) Convert.ToInt32((string) requestData["friendPerms"])); 236 (uint) Convert.ToInt32((string) requestData["friendPerms"]));
237 returnString = "TRUE"; 237 returnString = "TRUE";
238 } 238 }
@@ -252,8 +252,8 @@ namespace OpenSim.Grid.UserServer
252 if (requestData.Contains("ownerID") && requestData.Contains("friendID")) 252 if (requestData.Contains("ownerID") && requestData.Contains("friendID"))
253 { 253 {
254 // UserManagerBase.AddNewuserFriend 254 // UserManagerBase.AddNewuserFriend
255 RemoveUserFriend(new LLUUID((string) requestData["ownerID"]), 255 RemoveUserFriend(new UUID((string) requestData["ownerID"]),
256 new LLUUID((string) requestData["friendID"])); 256 new UUID((string) requestData["friendID"]));
257 returnString = "TRUE"; 257 returnString = "TRUE";
258 } 258 }
259 responseData["returnString"] = returnString; 259 responseData["returnString"] = returnString;
@@ -271,8 +271,8 @@ namespace OpenSim.Grid.UserServer
271 if (requestData.Contains("ownerID") && requestData.Contains("friendID") && 271 if (requestData.Contains("ownerID") && requestData.Contains("friendID") &&
272 requestData.Contains("friendPerms")) 272 requestData.Contains("friendPerms"))
273 { 273 {
274 UpdateUserFriendPerms(new LLUUID((string) requestData["ownerID"]), 274 UpdateUserFriendPerms(new UUID((string) requestData["ownerID"]),
275 new LLUUID((string) requestData["friendID"]), 275 new UUID((string) requestData["friendID"]),
276 (uint) Convert.ToInt32((string) requestData["friendPerms"])); 276 (uint) Convert.ToInt32((string) requestData["friendPerms"]));
277 // UserManagerBase. 277 // UserManagerBase.
278 returnString = "TRUE"; 278 returnString = "TRUE";
@@ -292,7 +292,7 @@ namespace OpenSim.Grid.UserServer
292 292
293 if (requestData.Contains("ownerID")) 293 if (requestData.Contains("ownerID"))
294 { 294 {
295 returndata = GetUserFriendList(new LLUUID((string) requestData["ownerID"])); 295 returndata = GetUserFriendList(new UUID((string) requestData["ownerID"]));
296 } 296 }
297 297
298 return FriendListItemListtoXmlRPCResponse(returndata); 298 return FriendListItemListtoXmlRPCResponse(returndata);
@@ -306,7 +306,7 @@ namespace OpenSim.Grid.UserServer
306 Hashtable responseData; 306 Hashtable responseData;
307 if (requestData.Contains("owner")) 307 if (requestData.Contains("owner"))
308 { 308 {
309 appearance = GetUserAppearance(new LLUUID((string) requestData["owner"])); 309 appearance = GetUserAppearance(new UUID((string) requestData["owner"]));
310 if (appearance == null) 310 if (appearance == null)
311 { 311 {
312 responseData = new Hashtable(); 312 responseData = new Hashtable();
@@ -337,7 +337,7 @@ namespace OpenSim.Grid.UserServer
337 if (requestData.Contains("owner")) 337 if (requestData.Contains("owner"))
338 { 338 {
339 AvatarAppearance appearance = new AvatarAppearance(requestData); 339 AvatarAppearance appearance = new AvatarAppearance(requestData);
340 UpdateUserAppearance(new LLUUID((string) requestData["owner"]), appearance); 340 UpdateUserAppearance(new UUID((string) requestData["owner"]), appearance);
341 responseData = new Hashtable(); 341 responseData = new Hashtable();
342 responseData["returnString"] = "TRUE"; 342 responseData["returnString"] = "TRUE";
343 } 343 }
@@ -396,7 +396,7 @@ namespace OpenSim.Grid.UserServer
396 { 396 {
397 try 397 try
398 { 398 {
399 LLUUID guess = new LLUUID((string) requestData["avatar_uuid"]); 399 UUID guess = new UUID((string) requestData["avatar_uuid"]);
400 400
401 userProfile = GetUserProfile(guess); 401 userProfile = GetUserProfile(guess);
402 } 402 }
@@ -427,11 +427,11 @@ namespace OpenSim.Grid.UserServer
427 //CFK: Console.WriteLine("METHOD BY UUID CALLED"); 427 //CFK: Console.WriteLine("METHOD BY UUID CALLED");
428 if (requestData.Contains("avatar_uuid")) 428 if (requestData.Contains("avatar_uuid"))
429 { 429 {
430 LLUUID guess; 430 UUID guess;
431 431
432 Helpers.TryParse((string) requestData["avatar_uuid"], out guess); 432 UUID.TryParse((string) requestData["avatar_uuid"], out guess);
433 433
434 if (guess == LLUUID.Zero) 434 if (guess == UUID.Zero)
435 { 435 {
436 return CreateUnknownUserErrorResponse(); 436 return CreateUnknownUserErrorResponse();
437 } 437 }
@@ -476,16 +476,16 @@ namespace OpenSim.Grid.UserServer
476 string authed = "FALSE"; 476 string authed = "FALSE";
477 if (requestData.Contains("avatar_uuid") && requestData.Contains("session_id")) 477 if (requestData.Contains("avatar_uuid") && requestData.Contains("session_id"))
478 { 478 {
479 LLUUID guess_aid; 479 UUID guess_aid;
480 LLUUID guess_sid; 480 UUID guess_sid;
481 481
482 Helpers.TryParse((string) requestData["avatar_uuid"], out guess_aid); 482 UUID.TryParse((string) requestData["avatar_uuid"], out guess_aid);
483 if (guess_aid == LLUUID.Zero) 483 if (guess_aid == UUID.Zero)
484 { 484 {
485 return CreateUnknownUserErrorResponse(); 485 return CreateUnknownUserErrorResponse();
486 } 486 }
487 Helpers.TryParse((string) requestData["session_id"], out guess_sid); 487 UUID.TryParse((string) requestData["session_id"], out guess_sid);
488 if (guess_sid == LLUUID.Zero) 488 if (guess_sid == UUID.Zero)
489 { 489 {
490 return CreateUnknownUserErrorResponse(); 490 return CreateUnknownUserErrorResponse();
491 } 491 }
@@ -520,7 +520,7 @@ namespace OpenSim.Grid.UserServer
520 return CreateUnknownUserErrorResponse(); 520 return CreateUnknownUserErrorResponse();
521 } 521 }
522 522
523 LLUUID UserUUID = new LLUUID((string) requestData["avatar_uuid"]); 523 UUID UserUUID = new UUID((string) requestData["avatar_uuid"]);
524 UserProfileData userProfile = GetUserProfile(UserUUID); 524 UserProfileData userProfile = GetUserProfile(UserUUID);
525 if (null == userProfile) 525 if (null == userProfile)
526 { 526 {
@@ -532,11 +532,11 @@ namespace OpenSim.Grid.UserServer
532 } 532 }
533 if (requestData.Contains("FLImageID")) 533 if (requestData.Contains("FLImageID"))
534 { 534 {
535 userProfile.FirstLifeImage = new LLUUID((string) requestData["FLImageID"]); 535 userProfile.FirstLifeImage = new UUID((string) requestData["FLImageID"]);
536 } 536 }
537 if (requestData.Contains("ImageID")) 537 if (requestData.Contains("ImageID"))
538 { 538 {
539 userProfile.Image = new LLUUID((string) requestData["ImageID"]); 539 userProfile.Image = new UUID((string) requestData["ImageID"]);
540 } 540 }
541 // dont' know how yet 541 // dont' know how yet
542 if (requestData.Contains("MaturePublish")) 542 if (requestData.Contains("MaturePublish"))
@@ -575,8 +575,8 @@ namespace OpenSim.Grid.UserServer
575 } 575 }
576 if (requestData.Contains("home_region_id")) 576 if (requestData.Contains("home_region_id"))
577 { 577 {
578 LLUUID regionID; 578 UUID regionID;
579 LLUUID.TryParse((string) requestData["home_region_id"], out regionID); 579 UUID.TryParse((string) requestData["home_region_id"], out regionID);
580 userProfile.HomeRegionID = regionID; 580 userProfile.HomeRegionID = regionID;
581 } 581 }
582 if (requestData.Contains("home_pos_x")) 582 if (requestData.Contains("home_pos_x"))
@@ -682,7 +682,7 @@ namespace OpenSim.Grid.UserServer
682 { 682 {
683 try 683 try
684 { 684 {
685 userProfile.Partner = new LLUUID((string) requestData["partner"]); 685 userProfile.Partner = new UUID((string) requestData["partner"]);
686 } 686 }
687 catch (InvalidCastException) 687 catch (InvalidCastException)
688 { 688 {
@@ -691,7 +691,7 @@ namespace OpenSim.Grid.UserServer
691 } 691 }
692 else 692 else
693 { 693 {
694 userProfile.Partner = LLUUID.Zero; 694 userProfile.Partner = UUID.Zero;
695 } 695 }
696 696
697 // call plugin! 697 // call plugin!
@@ -710,8 +710,8 @@ namespace OpenSim.Grid.UserServer
710 { 710 {
711 try 711 try
712 { 712 {
713 LLUUID userUUID = new LLUUID((string) requestData["avatar_uuid"]); 713 UUID userUUID = new UUID((string) requestData["avatar_uuid"]);
714 LLUUID RegionID = new LLUUID((string) requestData["region_uuid"]); 714 UUID RegionID = new UUID((string) requestData["region_uuid"]);
715 ulong regionhandle = (ulong) Convert.ToInt64((string) requestData["region_handle"]); 715 ulong regionhandle = (ulong) Convert.ToInt64((string) requestData["region_handle"]);
716 float posx = (float) Convert.ToDecimal((string) requestData["region_pos_x"]); 716 float posx = (float) Convert.ToDecimal((string) requestData["region_pos_x"]);
717 float posy = (float) Convert.ToDecimal((string) requestData["region_pos_y"]); 717 float posy = (float) Convert.ToDecimal((string) requestData["region_pos_y"]);
@@ -749,9 +749,9 @@ namespace OpenSim.Grid.UserServer
749 throw new Exception("The method or operation is not implemented."); 749 throw new Exception("The method or operation is not implemented.");
750 } 750 }
751 751
752 public override UserProfileData SetupMasterUser(LLUUID uuid) 752 public override UserProfileData SetupMasterUser(UUID uuid)
753 { 753 {
754 throw new Exception("The method or operation is not implemented."); 754 throw new Exception("The method or operation is not implemented.");
755 } 755 }
756 } 756 }
757} \ No newline at end of file 757}