aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Server/Handlers/Hypergrid/UserAgentServerConnector.cs
diff options
context:
space:
mode:
authorDan Lake2012-03-27 12:51:58 -0700
committerDan Lake2012-03-27 12:51:58 -0700
commit971d32fda3cf8384987a6709cd2242afecce13ab (patch)
tree2607c27fad429ff0036fe7b7d275ddf717397282 /OpenSim/Server/Handlers/Hypergrid/UserAgentServerConnector.cs
parentWhen loading objects from DB, first add to scene, then call TriggerOnSceneObj... (diff)
parentHG: beginning of a more restrictive inventory access procedure (optional). Ex... (diff)
downloadopensim-SC-971d32fda3cf8384987a6709cd2242afecce13ab.zip
opensim-SC-971d32fda3cf8384987a6709cd2242afecce13ab.tar.gz
opensim-SC-971d32fda3cf8384987a6709cd2242afecce13ab.tar.bz2
opensim-SC-971d32fda3cf8384987a6709cd2242afecce13ab.tar.xz
Merge branch 'master' of ssh://opensimulator.org/var/git/opensim
Diffstat (limited to '')
-rw-r--r--OpenSim/Server/Handlers/Hypergrid/UserAgentServerConnector.cs38
1 files changed, 36 insertions, 2 deletions
diff --git a/OpenSim/Server/Handlers/Hypergrid/UserAgentServerConnector.cs b/OpenSim/Server/Handlers/Hypergrid/UserAgentServerConnector.cs
index 1bd3706..db62aaa 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 }
@@ -216,6 +222,7 @@ namespace OpenSim.Server.Handlers.Hypergrid
216 222
217 } 223 }
218 224
225 [Obsolete]
219 public XmlRpcResponse StatusNotification(XmlRpcRequest request, IPEndPoint remoteClient) 226 public XmlRpcResponse StatusNotification(XmlRpcRequest request, IPEndPoint remoteClient)
220 { 227 {
221 Hashtable hash = new Hashtable(); 228 Hashtable hash = new Hashtable();
@@ -410,8 +417,7 @@ namespace OpenSim.Server.Handlers.Hypergrid
410 } 417 }
411 418
412 /// <summary> 419 /// <summary>
413 /// Locates the user. 420 /// Returns the UUI of a user given a UUID.
414 /// This is a sensitive operation, only authorized IP addresses can perform it.
415 /// </summary> 421 /// </summary>
416 /// <param name="request"></param> 422 /// <param name="request"></param>
417 /// <param name="remoteClient"></param> 423 /// <param name="remoteClient"></param>
@@ -445,5 +451,33 @@ namespace OpenSim.Server.Handlers.Hypergrid
445 451
446 } 452 }
447 453
454 /// <summary>
455 /// Gets the UUID of a user given First name, Last name.
456 /// </summary>
457 /// <param name="request"></param>
458 /// <param name="remoteClient"></param>
459 /// <returns></returns>
460 public XmlRpcResponse GetUUID(XmlRpcRequest request, IPEndPoint remoteClient)
461 {
462 Hashtable hash = new Hashtable();
463
464 Hashtable requestData = (Hashtable)request.Params[0];
465 //string host = (string)requestData["host"];
466 //string portstr = (string)requestData["port"];
467 if (requestData.ContainsKey("first") && requestData.ContainsKey("last"))
468 {
469 UUID userID = UUID.Zero;
470 string first = (string)requestData["first"];
471
472 string last = (string)requestData["last"];
473 UUID uuid = m_HomeUsersService.GetUUID(first, last);
474 hash["UUID"] = uuid.ToString();
475 }
476
477 XmlRpcResponse response = new XmlRpcResponse();
478 response.Value = hash;
479 return response;
480
481 }
448 } 482 }
449} 483}