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/Handlers/Hypergrid/UserAgentServerConnector.cs')
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
From d08ad6459a03a6a5a6a551fd2b275f1c7da94d8e Mon Sep 17 00:00:00 2001
From: Diva Canto
Date: Tue, 20 Mar 2012 17:14:19 -0700
Subject: HG Friends: allow the establishment of HG friendships without
requiring co-presence in the same sim. Using avatar picker, users can now
search for names such as "first.last@grid.com:9000", find them, and request
friendship. Friendship requests are stored if target user is offline. TESTED
ON STANDALONE ONLY.
---
OpenSim/Server/Handlers/Hypergrid/UserAgentServerConnector.cs | 5 +++++
1 file changed, 5 insertions(+)
(limited to 'OpenSim/Server/Handlers/Hypergrid/UserAgentServerConnector.cs')
diff --git a/OpenSim/Server/Handlers/Hypergrid/UserAgentServerConnector.cs b/OpenSim/Server/Handlers/Hypergrid/UserAgentServerConnector.cs
index 7348368..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
// MethodBase.GetCurrentMethod().DeclaringType);
private IUserAgentService m_HomeUsersService;
+ public IUserAgentService HomeUsersService
+ {
+ get { return m_HomeUsersService; }
+ }
+
private string[] m_AuthorizedCallers;
private bool m_VerifyCallers = false;
--
cgit v1.1