aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Server
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Server')
-rw-r--r--OpenSim/Server/Handlers/Hypergrid/UserAgentServerConnector.cs32
1 files changed, 31 insertions, 1 deletions
diff --git a/OpenSim/Server/Handlers/Hypergrid/UserAgentServerConnector.cs b/OpenSim/Server/Handlers/Hypergrid/UserAgentServerConnector.cs
index 7a9fb4b..e51fe0b 100644
--- a/OpenSim/Server/Handlers/Hypergrid/UserAgentServerConnector.cs
+++ b/OpenSim/Server/Handlers/Hypergrid/UserAgentServerConnector.cs
@@ -83,6 +83,7 @@ namespace OpenSim.Server.Handlers.Hypergrid
83 83
84 server.AddXmlRPCHandler("status_notification", StatusNotification, false); 84 server.AddXmlRPCHandler("status_notification", StatusNotification, false);
85 server.AddXmlRPCHandler("get_online_friends", GetOnlineFriends, false); 85 server.AddXmlRPCHandler("get_online_friends", GetOnlineFriends, false);
86 server.AddXmlRPCHandler("get_server_urls", GetServerURLs, false);
86 87
87 server.AddHTTPHandler("/homeagent/", new HomeAgentHandler(m_HomeUsersService, loginServerIP, proxy).Handler); 88 server.AddHTTPHandler("/homeagent/", new HomeAgentHandler(m_HomeUsersService, loginServerIP, proxy).Handler);
88 } 89 }
@@ -256,7 +257,6 @@ namespace OpenSim.Server.Handlers.Hypergrid
256 ids.Add(requestData[key].ToString()); 257 ids.Add(requestData[key].ToString());
257 } 258 }
258 259
259 // let's spawn a thread for this, because it may take a long time...
260 List<UUID> online = m_HomeUsersService.GetOnlineFriends(userID, ids); 260 List<UUID> online = m_HomeUsersService.GetOnlineFriends(userID, ids);
261 if (online.Count > 0) 261 if (online.Count > 0)
262 { 262 {
@@ -266,8 +266,38 @@ namespace OpenSim.Server.Handlers.Hypergrid
266 hash["friend_" + i.ToString()] = id.ToString(); 266 hash["friend_" + i.ToString()] = id.ToString();
267 i++; 267 i++;
268 } 268 }
269 }
270 else
271 hash["result"] = "No Friends Online";
272 }
273
274 XmlRpcResponse response = new XmlRpcResponse();
275 response.Value = hash;
276 return response;
277
278 }
279
280 public XmlRpcResponse GetServerURLs(XmlRpcRequest request, IPEndPoint remoteClient)
281 {
282 Hashtable hash = new Hashtable();
269 283
284 Hashtable requestData = (Hashtable)request.Params[0];
285 //string host = (string)requestData["host"];
286 //string portstr = (string)requestData["port"];
287 if (requestData.ContainsKey("userID"))
288 {
289 string userID_str = (string)requestData["userID"];
290 UUID userID = UUID.Zero;
291 UUID.TryParse(userID_str, out userID);
292
293 Dictionary<string, object> serverURLs = m_HomeUsersService.GetServerURLs(userID);
294 if (serverURLs.Count > 0)
295 {
296 foreach (KeyValuePair<string, object> kvp in serverURLs)
297 hash["SRV_" + kvp.Key] = kvp.Value.ToString();
270 } 298 }
299 else
300 hash["result"] = "No Service URLs";
271 } 301 }
272 302
273 XmlRpcResponse response = new XmlRpcResponse(); 303 XmlRpcResponse response = new XmlRpcResponse();