diff options
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Server/Handlers/Hypergrid/UserAgentServerConnector.cs | 37 |
1 files changed, 35 insertions, 2 deletions
diff --git a/OpenSim/Server/Handlers/Hypergrid/UserAgentServerConnector.cs b/OpenSim/Server/Handlers/Hypergrid/UserAgentServerConnector.cs index 1bd3706..9a0e27e 100644 --- a/OpenSim/Server/Handlers/Hypergrid/UserAgentServerConnector.cs +++ b/OpenSim/Server/Handlers/Hypergrid/UserAgentServerConnector.cs | |||
@@ -52,6 +52,11 @@ namespace OpenSim.Server.Handlers.Hypergrid | |||
52 | // MethodBase.GetCurrentMethod().DeclaringType); | 52 | // MethodBase.GetCurrentMethod().DeclaringType); |
53 | 53 | ||
54 | private IUserAgentService m_HomeUsersService; | 54 | private IUserAgentService m_HomeUsersService; |
55 | public IUserAgentService HomeUsersService | ||
56 | { | ||
57 | get { return m_HomeUsersService; } | ||
58 | } | ||
59 | |||
55 | private string[] m_AuthorizedCallers; | 60 | private string[] m_AuthorizedCallers; |
56 | 61 | ||
57 | private bool m_VerifyCallers = false; | 62 | private bool m_VerifyCallers = false; |
@@ -96,6 +101,7 @@ namespace OpenSim.Server.Handlers.Hypergrid | |||
96 | 101 | ||
97 | server.AddXmlRPCHandler("locate_user", LocateUser, false); | 102 | server.AddXmlRPCHandler("locate_user", LocateUser, false); |
98 | server.AddXmlRPCHandler("get_uui", GetUUI, false); | 103 | server.AddXmlRPCHandler("get_uui", GetUUI, false); |
104 | server.AddXmlRPCHandler("get_uuid", GetUUID, false); | ||
99 | 105 | ||
100 | server.AddHTTPHandler("/homeagent/", new HomeAgentHandler(m_HomeUsersService, loginServerIP, proxy).Handler); | 106 | server.AddHTTPHandler("/homeagent/", new HomeAgentHandler(m_HomeUsersService, loginServerIP, proxy).Handler); |
101 | } | 107 | } |
@@ -410,8 +416,7 @@ namespace OpenSim.Server.Handlers.Hypergrid | |||
410 | } | 416 | } |
411 | 417 | ||
412 | /// <summary> | 418 | /// <summary> |
413 | /// Locates the user. | 419 | /// Returns the UUI of a user given a UUID. |
414 | /// This is a sensitive operation, only authorized IP addresses can perform it. | ||
415 | /// </summary> | 420 | /// </summary> |
416 | /// <param name="request"></param> | 421 | /// <param name="request"></param> |
417 | /// <param name="remoteClient"></param> | 422 | /// <param name="remoteClient"></param> |
@@ -445,5 +450,33 @@ namespace OpenSim.Server.Handlers.Hypergrid | |||
445 | 450 | ||
446 | } | 451 | } |
447 | 452 | ||
453 | /// <summary> | ||
454 | /// Gets the UUID of a user given First name, Last name. | ||
455 | /// </summary> | ||
456 | /// <param name="request"></param> | ||
457 | /// <param name="remoteClient"></param> | ||
458 | /// <returns></returns> | ||
459 | public XmlRpcResponse GetUUID(XmlRpcRequest request, IPEndPoint remoteClient) | ||
460 | { | ||
461 | Hashtable hash = new Hashtable(); | ||
462 | |||
463 | Hashtable requestData = (Hashtable)request.Params[0]; | ||
464 | //string host = (string)requestData["host"]; | ||
465 | //string portstr = (string)requestData["port"]; | ||
466 | if (requestData.ContainsKey("first") && requestData.ContainsKey("last")) | ||
467 | { | ||
468 | UUID userID = UUID.Zero; | ||
469 | string first = (string)requestData["first"]; | ||
470 | |||
471 | string last = (string)requestData["last"]; | ||
472 | UUID uuid = m_HomeUsersService.GetUUID(first, last); | ||
473 | hash["UUID"] = uuid.ToString(); | ||
474 | } | ||
475 | |||
476 | XmlRpcResponse response = new XmlRpcResponse(); | ||
477 | response.Value = hash; | ||
478 | return response; | ||
479 | |||
480 | } | ||
448 | } | 481 | } |
449 | } | 482 | } |