aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Grid
diff options
context:
space:
mode:
authorTeravus Ovares2007-12-04 16:07:59 +0000
committerTeravus Ovares2007-12-04 16:07:59 +0000
commita553e6f67ce2595868ceba0184f730af640961cf (patch)
tree38de3c5b956d829064e541f671a5d8f0b2d935f4 /OpenSim/Grid
parent* ApplyPhysics now creates the PhysActor as well. (diff)
downloadopensim-SC_OLD-a553e6f67ce2595868ceba0184f730af640961cf.zip
opensim-SC_OLD-a553e6f67ce2595868ceba0184f730af640961cf.tar.gz
opensim-SC_OLD-a553e6f67ce2595868ceba0184f730af640961cf.tar.bz2
opensim-SC_OLD-a553e6f67ce2595868ceba0184f730af640961cf.tar.xz
* Avatar picker works in grid mode now.
* To test, click the communicate button, then click the 'add' button and type a name. You will get a list of closely matching avatar names. * Before this'll work on your sim in grid mode, the UGA needs to be updated. If it isn't updated, then you'll get a message on the sim console when searching like, 'got invalid queryid'.
Diffstat (limited to 'OpenSim/Grid')
-rw-r--r--OpenSim/Grid/UserServer/Main.cs2
-rw-r--r--OpenSim/Grid/UserServer/UserManager.cs36
2 files changed, 38 insertions, 0 deletions
diff --git a/OpenSim/Grid/UserServer/Main.cs b/OpenSim/Grid/UserServer/Main.cs
index c834690..634698e 100644
--- a/OpenSim/Grid/UserServer/Main.cs
+++ b/OpenSim/Grid/UserServer/Main.cs
@@ -98,6 +98,8 @@ namespace OpenSim.Grid.UserServer
98 98
99 httpServer.AddXmlRPCHandler("get_user_by_name", m_userManager.XmlRPCGetUserMethodName); 99 httpServer.AddXmlRPCHandler("get_user_by_name", m_userManager.XmlRPCGetUserMethodName);
100 httpServer.AddXmlRPCHandler("get_user_by_uuid", m_userManager.XmlRPCGetUserMethodUUID); 100 httpServer.AddXmlRPCHandler("get_user_by_uuid", m_userManager.XmlRPCGetUserMethodUUID);
101 httpServer.AddXmlRPCHandler("get_avatar_picker_avatar", m_userManager.XmlRPCGetAvatarPickerAvatar);
102
101 103
102 httpServer.AddStreamHandler( 104 httpServer.AddStreamHandler(
103 new RestStreamHandler("DELETE", "/usersessions/", m_userManager.RestDeleteUserSessionMethod)); 105 new RestStreamHandler("DELETE", "/usersessions/", m_userManager.RestDeleteUserSessionMethod));
diff --git a/OpenSim/Grid/UserServer/UserManager.cs b/OpenSim/Grid/UserServer/UserManager.cs
index 58e9677..16eedcd 100644
--- a/OpenSim/Grid/UserServer/UserManager.cs
+++ b/OpenSim/Grid/UserServer/UserManager.cs
@@ -27,6 +27,7 @@
27*/ 27*/
28using System; 28using System;
29using System.Collections; 29using System.Collections;
30using System.Collections.Generic;
30using libsecondlife; 31using libsecondlife;
31using Nwc.XmlRpc; 32using Nwc.XmlRpc;
32using OpenSim.Framework; 33using OpenSim.Framework;
@@ -70,6 +71,24 @@ namespace OpenSim.Grid.UserServer
70 return response; 71 return response;
71 } 72 }
72 73
74 public XmlRpcResponse AvatarPickerListtoXmlRPCResponse(LLUUID queryID, List<AvatarPickerAvatar> returnUsers)
75 {
76 XmlRpcResponse response = new XmlRpcResponse();
77 Hashtable responseData = new Hashtable();
78 // Query Result Information
79 responseData["queryid"] = (string)queryID.ToStringHyphenated();
80 responseData["avcount"] = (string)returnUsers.Count.ToString();
81
82 for (int i = 0; i < returnUsers.Count; i++)
83 {
84 responseData["avatarid" + i.ToString()] = returnUsers[i].AvatarID.ToStringHyphenated();
85 responseData["firstname" + i.ToString()] = returnUsers[i].firstName;
86 responseData["lastname" + i.ToString()] = returnUsers[i].lastName;
87 }
88 response.Value = responseData;
89
90 return response;
91 }
73 /// <summary> 92 /// <summary>
74 /// Converts a user profile to an XML element which can be returned 93 /// Converts a user profile to an XML element which can be returned
75 /// </summary> 94 /// </summary>
@@ -113,6 +132,23 @@ namespace OpenSim.Grid.UserServer
113 132
114 #region XMLRPC User Methods 133 #region XMLRPC User Methods
115 134
135 public XmlRpcResponse XmlRPCGetAvatarPickerAvatar(XmlRpcRequest request)
136 {
137 XmlRpcResponse response = new XmlRpcResponse();
138 Hashtable requestData = (Hashtable)request.Params[0];
139 List<AvatarPickerAvatar> returnAvatar = new List<AvatarPickerAvatar>();
140 LLUUID queryID = new LLUUID(LLUUID.Zero.ToStringHyphenated());
141
142 if (requestData.Contains("avquery") && requestData.Contains("queryid"))
143 {
144 queryID = new LLUUID((string)requestData["queryid"]);
145 returnAvatar = GenerateAgentPickerRequestResponse(queryID,(string)requestData["avquery"]);
146 }
147
148 Console.WriteLine("[AVATARINFO]: Servicing Avatar Query: " + (string)requestData["avquery"]);
149 return AvatarPickerListtoXmlRPCResponse(queryID,returnAvatar);
150 }
151
116 public XmlRpcResponse XmlRPCGetUserMethodName(XmlRpcRequest request) 152 public XmlRpcResponse XmlRPCGetUserMethodName(XmlRpcRequest request)
117 { 153 {
118 XmlRpcResponse response = new XmlRpcResponse(); 154 XmlRpcResponse response = new XmlRpcResponse();