diff options
author | Dan Lake | 2012-01-03 16:52:53 -0800 |
---|---|---|
committer | Dan Lake | 2012-01-03 16:52:53 -0800 |
commit | ecf9824b63d181bd4e64bd5cb0ff37b952669bb9 (patch) | |
tree | 269207a773c6bd1fd8383885e0c5649d70b34a62 /OpenSim/Server/Handlers | |
parent | Access to these static methods to serialize objects are useful outside of ser... (diff) | |
parent | Update C5.dll to version 1.1.1 from 1.1.0 (diff) | |
download | opensim-SC_OLD-ecf9824b63d181bd4e64bd5cb0ff37b952669bb9.zip opensim-SC_OLD-ecf9824b63d181bd4e64bd5cb0ff37b952669bb9.tar.gz opensim-SC_OLD-ecf9824b63d181bd4e64bd5cb0ff37b952669bb9.tar.bz2 opensim-SC_OLD-ecf9824b63d181bd4e64bd5cb0ff37b952669bb9.tar.xz |
Merge branch 'master' of ssh://opensimulator.org/var/git/opensim
Diffstat (limited to 'OpenSim/Server/Handlers')
-rw-r--r-- | OpenSim/Server/Handlers/Hypergrid/UserAgentServerConnector.cs | 33 | ||||
-rw-r--r-- | OpenSim/Server/Handlers/UserAccounts/UserAccountServerPostHandler.cs | 2 |
2 files changed, 34 insertions, 1 deletions
diff --git a/OpenSim/Server/Handlers/Hypergrid/UserAgentServerConnector.cs b/OpenSim/Server/Handlers/Hypergrid/UserAgentServerConnector.cs index 07c6962..1bd3706 100644 --- a/OpenSim/Server/Handlers/Hypergrid/UserAgentServerConnector.cs +++ b/OpenSim/Server/Handlers/Hypergrid/UserAgentServerConnector.cs | |||
@@ -91,6 +91,7 @@ namespace OpenSim.Server.Handlers.Hypergrid | |||
91 | 91 | ||
92 | server.AddXmlRPCHandler("status_notification", StatusNotification, false); | 92 | server.AddXmlRPCHandler("status_notification", StatusNotification, false); |
93 | server.AddXmlRPCHandler("get_online_friends", GetOnlineFriends, false); | 93 | server.AddXmlRPCHandler("get_online_friends", GetOnlineFriends, false); |
94 | server.AddXmlRPCHandler("get_user_info", GetUserInfo, false); | ||
94 | server.AddXmlRPCHandler("get_server_urls", GetServerURLs, false); | 95 | server.AddXmlRPCHandler("get_server_urls", GetServerURLs, false); |
95 | 96 | ||
96 | server.AddXmlRPCHandler("locate_user", LocateUser, false); | 97 | server.AddXmlRPCHandler("locate_user", LocateUser, false); |
@@ -299,6 +300,38 @@ namespace OpenSim.Server.Handlers.Hypergrid | |||
299 | 300 | ||
300 | } | 301 | } |
301 | 302 | ||
303 | public XmlRpcResponse GetUserInfo(XmlRpcRequest request, IPEndPoint remoteClient) | ||
304 | { | ||
305 | Hashtable hash = new Hashtable(); | ||
306 | Hashtable requestData = (Hashtable)request.Params[0]; | ||
307 | |||
308 | // This needs checking! | ||
309 | if (requestData.ContainsKey("userID")) | ||
310 | { | ||
311 | string userID_str = (string)requestData["userID"]; | ||
312 | UUID userID = UUID.Zero; | ||
313 | UUID.TryParse(userID_str, out userID); | ||
314 | |||
315 | //int userFlags = m_HomeUsersService.GetUserFlags(userID); | ||
316 | Dictionary<string,object> userInfo = m_HomeUsersService.GetUserInfo(userID); | ||
317 | if (userInfo.Count > 0) | ||
318 | { | ||
319 | foreach (KeyValuePair<string, object> kvp in userInfo) | ||
320 | { | ||
321 | hash[kvp.Key] = kvp.Value; | ||
322 | } | ||
323 | } | ||
324 | else | ||
325 | { | ||
326 | hash["result"] = "failure"; | ||
327 | } | ||
328 | } | ||
329 | |||
330 | XmlRpcResponse response = new XmlRpcResponse(); | ||
331 | response.Value = hash; | ||
332 | return response; | ||
333 | } | ||
334 | |||
302 | public XmlRpcResponse GetServerURLs(XmlRpcRequest request, IPEndPoint remoteClient) | 335 | public XmlRpcResponse GetServerURLs(XmlRpcRequest request, IPEndPoint remoteClient) |
303 | { | 336 | { |
304 | Hashtable hash = new Hashtable(); | 337 | Hashtable hash = new Hashtable(); |
diff --git a/OpenSim/Server/Handlers/UserAccounts/UserAccountServerPostHandler.cs b/OpenSim/Server/Handlers/UserAccounts/UserAccountServerPostHandler.cs index ab383ef..3fd69ae 100644 --- a/OpenSim/Server/Handlers/UserAccounts/UserAccountServerPostHandler.cs +++ b/OpenSim/Server/Handlers/UserAccounts/UserAccountServerPostHandler.cs | |||
@@ -231,7 +231,7 @@ namespace OpenSim.Server.Handlers.UserAccounts | |||
231 | 231 | ||
232 | int userLevel = 0; | 232 | int userLevel = 0; |
233 | if (request.ContainsKey("UserLevel") && int.TryParse(request["UserLevel"].ToString(), out userLevel)) | 233 | if (request.ContainsKey("UserLevel") && int.TryParse(request["UserLevel"].ToString(), out userLevel)) |
234 | existingAccount.UserFlags = userLevel; | 234 | existingAccount.UserLevel = userLevel; |
235 | 235 | ||
236 | int userFlags = 0; | 236 | int userFlags = 0; |
237 | if (request.ContainsKey("UserFlags") && int.TryParse(request["UserFlags"].ToString(), out userFlags)) | 237 | if (request.ContainsKey("UserFlags") && int.TryParse(request["UserFlags"].ToString(), out userFlags)) |