diff options
author | Teravus Ovares | 2008-06-01 10:05:22 +0000 |
---|---|---|
committer | Teravus Ovares | 2008-06-01 10:05:22 +0000 |
commit | d20cae2d03f26f92e88f28ec187de50934144fcb (patch) | |
tree | 3a64d3c73f86b645a7d7b0970d2594bd223a0b81 /OpenSim/Grid | |
parent | * Applying Dahlia's patch : 0001429: Patch to fix prism physical mesh and add... (diff) | |
download | opensim-SC_OLD-d20cae2d03f26f92e88f28ec187de50934144fcb.zip opensim-SC_OLD-d20cae2d03f26f92e88f28ec187de50934144fcb.tar.gz opensim-SC_OLD-d20cae2d03f26f92e88f28ec187de50934144fcb.tar.bz2 opensim-SC_OLD-d20cae2d03f26f92e88f28ec187de50934144fcb.tar.xz |
* Committing more unfinished stuff. Nothing significant at the moment. IM related.
Diffstat (limited to 'OpenSim/Grid')
-rw-r--r-- | OpenSim/Grid/UserServer/UserManager.cs | 48 |
1 files changed, 48 insertions, 0 deletions
diff --git a/OpenSim/Grid/UserServer/UserManager.cs b/OpenSim/Grid/UserServer/UserManager.cs index 1b47289..3e8f3a2 100644 --- a/OpenSim/Grid/UserServer/UserManager.cs +++ b/OpenSim/Grid/UserServer/UserManager.cs | |||
@@ -420,6 +420,54 @@ namespace OpenSim.Grid.UserServer | |||
420 | 420 | ||
421 | return ProfileToXmlRPCResponse(userProfile); | 421 | return ProfileToXmlRPCResponse(userProfile); |
422 | } | 422 | } |
423 | public XmlRpcResponse XmlRPCGetAgentMethodUUID(XmlRpcRequest request) | ||
424 | { | ||
425 | XmlRpcResponse response = new XmlRpcResponse(); | ||
426 | Hashtable requestData = (Hashtable)request.Params[0]; | ||
427 | UserProfileData userProfile; | ||
428 | //CFK: this clogs the UserServer log and is not necessary at this time. | ||
429 | //CFK: Console.WriteLine("METHOD BY UUID CALLED"); | ||
430 | if (requestData.Contains("avatar_uuid")) | ||
431 | { | ||
432 | LLUUID guess = LLUUID.Zero; | ||
433 | |||
434 | Helpers.TryParse((string)requestData["avatar_uuid"],out guess); | ||
435 | |||
436 | if (guess == LLUUID.Zero) | ||
437 | { | ||
438 | return CreateUnknownUserErrorResponse(); | ||
439 | } | ||
440 | |||
441 | userProfile = GetUserProfile(guess); | ||
442 | |||
443 | if (userProfile == null) | ||
444 | { | ||
445 | return CreateUnknownUserErrorResponse(); | ||
446 | } | ||
447 | |||
448 | // no agent??? | ||
449 | if (userProfile.CurrentAgent == null) | ||
450 | { | ||
451 | return CreateUnknownUserErrorResponse(); | ||
452 | } | ||
453 | Hashtable responseData = new Hashtable(); | ||
454 | |||
455 | responseData["handle"]=userProfile.CurrentAgent.Handle.ToString(); | ||
456 | responseData["session"]=userProfile.CurrentAgent.SessionID.ToString(); | ||
457 | if (userProfile.CurrentAgent.AgentOnline) | ||
458 | responseData["agent_online"]="TRUE"; | ||
459 | else | ||
460 | responseData["agent_online"]="FALSE"; | ||
461 | |||
462 | response.Value = responseData; | ||
463 | } | ||
464 | else | ||
465 | { | ||
466 | return CreateUnknownUserErrorResponse(); | ||
467 | } | ||
468 | |||
469 | return ProfileToXmlRPCResponse(userProfile); | ||
470 | } | ||
423 | 471 | ||
424 | 472 | ||
425 | public XmlRpcResponse XmlRpcResponseXmlRPCUpdateUserProfile(XmlRpcRequest request) | 473 | public XmlRpcResponse XmlRpcResponseXmlRPCUpdateUserProfile(XmlRpcRequest request) |