diff options
author | Teravus Ovares | 2007-12-04 16:07:59 +0000 |
---|---|---|
committer | Teravus Ovares | 2007-12-04 16:07:59 +0000 |
commit | a553e6f67ce2595868ceba0184f730af640961cf (patch) | |
tree | 38de3c5b956d829064e541f671a5d8f0b2d935f4 /OpenSim/Grid/UserServer/UserManager.cs | |
parent | * ApplyPhysics now creates the PhysActor as well. (diff) | |
download | opensim-SC-a553e6f67ce2595868ceba0184f730af640961cf.zip opensim-SC-a553e6f67ce2595868ceba0184f730af640961cf.tar.gz opensim-SC-a553e6f67ce2595868ceba0184f730af640961cf.tar.bz2 opensim-SC-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/UserServer/UserManager.cs')
-rw-r--r-- | OpenSim/Grid/UserServer/UserManager.cs | 36 |
1 files changed, 36 insertions, 0 deletions
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 | */ |
28 | using System; | 28 | using System; |
29 | using System.Collections; | 29 | using System.Collections; |
30 | using System.Collections.Generic; | ||
30 | using libsecondlife; | 31 | using libsecondlife; |
31 | using Nwc.XmlRpc; | 32 | using Nwc.XmlRpc; |
32 | using OpenSim.Framework; | 33 | using 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(); |