From d1256536b500a0d72eb643635d10c65980ea2588 Mon Sep 17 00:00:00 2001
From: Diva Canto
Date: Sat, 17 Mar 2012 21:27:28 -0700
Subject: Added GetUUID(first, last) on UserAgentsService so that we can
finally make direct user connections.
---
.../Handlers/Hypergrid/UserAgentServerConnector.cs | 32 ++++++++++++++++++++--
1 file changed, 30 insertions(+), 2 deletions(-)
(limited to 'OpenSim/Server')
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
server.AddXmlRPCHandler("locate_user", LocateUser, false);
server.AddXmlRPCHandler("get_uui", GetUUI, false);
+ server.AddXmlRPCHandler("get_uuid", GetUUID, false);
server.AddHTTPHandler("/homeagent/", new HomeAgentHandler(m_HomeUsersService, loginServerIP, proxy).Handler);
}
@@ -410,8 +411,7 @@ namespace OpenSim.Server.Handlers.Hypergrid
}
///
- /// Locates the user.
- /// This is a sensitive operation, only authorized IP addresses can perform it.
+ /// Returns the UUI of a user given a UUID.
///
///
///
@@ -445,5 +445,33 @@ namespace OpenSim.Server.Handlers.Hypergrid
}
+ ///
+ /// Gets the UUID of a user given First name, Last name.
+ ///
+ ///
+ ///
+ ///
+ public XmlRpcResponse GetUUID(XmlRpcRequest request, IPEndPoint remoteClient)
+ {
+ Hashtable hash = new Hashtable();
+
+ Hashtable requestData = (Hashtable)request.Params[0];
+ //string host = (string)requestData["host"];
+ //string portstr = (string)requestData["port"];
+ if (requestData.ContainsKey("first") && requestData.ContainsKey("last"))
+ {
+ UUID userID = UUID.Zero;
+ string first = (string)requestData["first"];
+
+ string last = (string)requestData["last"];
+ UUID uuid = m_HomeUsersService.GetUUID(first, last);
+ hash["UUID"] = uuid.ToString();
+ }
+
+ XmlRpcResponse response = new XmlRpcResponse();
+ response.Value = hash;
+ return response;
+
+ }
}
}
--
cgit v1.1