aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Server/Handlers/Hypergrid
diff options
context:
space:
mode:
authorDiva Canto2012-03-17 21:27:28 -0700
committerDiva Canto2012-03-17 21:27:28 -0700
commitd1256536b500a0d72eb643635d10c65980ea2588 (patch)
treeb378a299d970fa5f3266a59f32baa607fee3006b /OpenSim/Server/Handlers/Hypergrid
parentAmend to previous commit: normalize strings ToLower. (diff)
downloadopensim-SC-d1256536b500a0d72eb643635d10c65980ea2588.zip
opensim-SC-d1256536b500a0d72eb643635d10c65980ea2588.tar.gz
opensim-SC-d1256536b500a0d72eb643635d10c65980ea2588.tar.bz2
opensim-SC-d1256536b500a0d72eb643635d10c65980ea2588.tar.xz
Added GetUUID(first, last) on UserAgentsService so that we can finally make direct user connections.
Diffstat (limited to 'OpenSim/Server/Handlers/Hypergrid')
-rw-r--r--OpenSim/Server/Handlers/Hypergrid/UserAgentServerConnector.cs32
1 files changed, 30 insertions, 2 deletions
diff --git a/OpenSim/Server/Handlers/Hypergrid/UserAgentServerConnector.cs b/OpenSim/Server/Handlers/Hypergrid/UserAgentServerConnector.cs
index 1bd3706..7348368 100644
--- a/OpenSim/Server/Handlers/Hypergrid/UserAgentServerConnector.cs
+++ b/OpenSim/Server/Handlers/Hypergrid/UserAgentServerConnector.cs
@@ -96,6 +96,7 @@ namespace OpenSim.Server.Handlers.Hypergrid
96 96
97 server.AddXmlRPCHandler("locate_user", LocateUser, false); 97 server.AddXmlRPCHandler("locate_user", LocateUser, false);
98 server.AddXmlRPCHandler("get_uui", GetUUI, false); 98 server.AddXmlRPCHandler("get_uui", GetUUI, false);
99 server.AddXmlRPCHandler("get_uuid", GetUUID, false);
99 100
100 server.AddHTTPHandler("/homeagent/", new HomeAgentHandler(m_HomeUsersService, loginServerIP, proxy).Handler); 101 server.AddHTTPHandler("/homeagent/", new HomeAgentHandler(m_HomeUsersService, loginServerIP, proxy).Handler);
101 } 102 }
@@ -410,8 +411,7 @@ namespace OpenSim.Server.Handlers.Hypergrid
410 } 411 }
411 412
412 /// <summary> 413 /// <summary>
413 /// Locates the user. 414 /// Returns the UUI of a user given a UUID.
414 /// This is a sensitive operation, only authorized IP addresses can perform it.
415 /// </summary> 415 /// </summary>
416 /// <param name="request"></param> 416 /// <param name="request"></param>
417 /// <param name="remoteClient"></param> 417 /// <param name="remoteClient"></param>
@@ -445,5 +445,33 @@ namespace OpenSim.Server.Handlers.Hypergrid
445 445
446 } 446 }
447 447
448 /// <summary>
449 /// Gets the UUID of a user given First name, Last name.
450 /// </summary>
451 /// <param name="request"></param>
452 /// <param name="remoteClient"></param>
453 /// <returns></returns>
454 public XmlRpcResponse GetUUID(XmlRpcRequest request, IPEndPoint remoteClient)
455 {
456 Hashtable hash = new Hashtable();
457
458 Hashtable requestData = (Hashtable)request.Params[0];
459 //string host = (string)requestData["host"];
460 //string portstr = (string)requestData["port"];
461 if (requestData.ContainsKey("first") && requestData.ContainsKey("last"))
462 {
463 UUID userID = UUID.Zero;
464 string first = (string)requestData["first"];
465
466 string last = (string)requestData["last"];
467 UUID uuid = m_HomeUsersService.GetUUID(first, last);
468 hash["UUID"] = uuid.ToString();
469 }
470
471 XmlRpcResponse response = new XmlRpcResponse();
472 response.Value = hash;
473 return response;
474
475 }
448 } 476 }
449} 477}