aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Grid/UserServer/UserManager.cs
diff options
context:
space:
mode:
authorlbsa712007-12-27 21:41:48 +0000
committerlbsa712007-12-27 21:41:48 +0000
commitefd90b56b761219af6425b1c7a2cdd3b6ffb4de2 (patch)
treebf5b897e1e3c13211e3e2fc61d30508b94c928c0 /OpenSim/Grid/UserServer/UserManager.cs
parent* removed always true if (diff)
downloadopensim-SC_OLD-efd90b56b761219af6425b1c7a2cdd3b6ffb4de2.zip
opensim-SC_OLD-efd90b56b761219af6425b1c7a2cdd3b6ffb4de2.tar.gz
opensim-SC_OLD-efd90b56b761219af6425b1c7a2cdd3b6ffb4de2.tar.bz2
opensim-SC_OLD-efd90b56b761219af6425b1c7a2cdd3b6ffb4de2.tar.xz
* Optimized usings
* shortened references * Removed redundant 'this' * Normalized EOF
Diffstat (limited to '')
-rw-r--r--OpenSim/Grid/UserServer/UserManager.cs32
1 files changed, 17 insertions, 15 deletions
diff --git a/OpenSim/Grid/UserServer/UserManager.cs b/OpenSim/Grid/UserServer/UserManager.cs
index be9e6f1..a50419e 100644
--- a/OpenSim/Grid/UserServer/UserManager.cs
+++ b/OpenSim/Grid/UserServer/UserManager.cs
@@ -28,6 +28,7 @@
28using System; 28using System;
29using System.Collections; 29using System.Collections;
30using System.Collections.Generic; 30using System.Collections.Generic;
31using System.Text.RegularExpressions;
31using libsecondlife; 32using libsecondlife;
32using Nwc.XmlRpc; 33using Nwc.XmlRpc;
33using OpenSim.Framework; 34using OpenSim.Framework;
@@ -76,8 +77,8 @@ namespace OpenSim.Grid.UserServer
76 XmlRpcResponse response = new XmlRpcResponse(); 77 XmlRpcResponse response = new XmlRpcResponse();
77 Hashtable responseData = new Hashtable(); 78 Hashtable responseData = new Hashtable();
78 // Query Result Information 79 // Query Result Information
79 responseData["queryid"] = (string)queryID.ToString(); 80 responseData["queryid"] = (string) queryID.ToString();
80 responseData["avcount"] = (string)returnUsers.Count.ToString(); 81 responseData["avcount"] = (string) returnUsers.Count.ToString();
81 82
82 for (int i = 0; i < returnUsers.Count; i++) 83 for (int i = 0; i < returnUsers.Count; i++)
83 { 84 {
@@ -86,9 +87,10 @@ namespace OpenSim.Grid.UserServer
86 responseData["lastname" + i.ToString()] = returnUsers[i].lastName; 87 responseData["lastname" + i.ToString()] = returnUsers[i].lastName;
87 } 88 }
88 response.Value = responseData; 89 response.Value = responseData;
89 90
90 return response; 91 return response;
91 } 92 }
93
92 /// <summary> 94 /// <summary>
93 /// Converts a user profile to an XML element which can be returned 95 /// Converts a user profile to an XML element which can be returned
94 /// </summary> 96 /// </summary>
@@ -135,18 +137,18 @@ namespace OpenSim.Grid.UserServer
135 public XmlRpcResponse XmlRPCGetAvatarPickerAvatar(XmlRpcRequest request) 137 public XmlRpcResponse XmlRPCGetAvatarPickerAvatar(XmlRpcRequest request)
136 { 138 {
137 XmlRpcResponse response = new XmlRpcResponse(); 139 XmlRpcResponse response = new XmlRpcResponse();
138 Hashtable requestData = (Hashtable)request.Params[0]; 140 Hashtable requestData = (Hashtable) request.Params[0];
139 List<AvatarPickerAvatar> returnAvatar = new List<AvatarPickerAvatar>(); 141 List<AvatarPickerAvatar> returnAvatar = new List<AvatarPickerAvatar>();
140 LLUUID queryID = new LLUUID(LLUUID.Zero.ToString()); 142 LLUUID queryID = new LLUUID(LLUUID.Zero.ToString());
141 143
142 if (requestData.Contains("avquery") && requestData.Contains("queryid")) 144 if (requestData.Contains("avquery") && requestData.Contains("queryid"))
143 { 145 {
144 queryID = new LLUUID((string)requestData["queryid"]); 146 queryID = new LLUUID((string) requestData["queryid"]);
145 returnAvatar = GenerateAgentPickerRequestResponse(queryID,(string)requestData["avquery"]); 147 returnAvatar = GenerateAgentPickerRequestResponse(queryID, (string) requestData["avquery"]);
146 } 148 }
147 149
148 Console.WriteLine("[AVATARINFO]: Servicing Avatar Query: " + (string)requestData["avquery"]); 150 Console.WriteLine("[AVATARINFO]: Servicing Avatar Query: " + (string) requestData["avquery"]);
149 return AvatarPickerListtoXmlRPCResponse(queryID,returnAvatar); 151 return AvatarPickerListtoXmlRPCResponse(queryID, returnAvatar);
150 } 152 }
151 153
152 public XmlRpcResponse XmlRPCGetUserMethodName(XmlRpcRequest request) 154 public XmlRpcResponse XmlRPCGetUserMethodName(XmlRpcRequest request)
@@ -156,16 +158,16 @@ namespace OpenSim.Grid.UserServer
156 UserProfileData userProfile; 158 UserProfileData userProfile;
157 if (requestData.Contains("avatar_name")) 159 if (requestData.Contains("avatar_name"))
158 { 160 {
159 string query = (string)requestData["avatar_name"]; 161 string query = (string) requestData["avatar_name"];
160 162
161 System.Text.RegularExpressions.Regex objAlphaNumericPattern = new System.Text.RegularExpressions.Regex("[^a-zA-Z0-9]"); 163 Regex objAlphaNumericPattern = new Regex("[^a-zA-Z0-9]");
162 164
163 string[] querysplit; 165 string[] querysplit;
164 querysplit = query.Split(' '); 166 querysplit = query.Split(' ');
165 167
166 if (querysplit.Length == 2) 168 if (querysplit.Length == 2)
167 { 169 {
168 userProfile = GetUserProfile(querysplit[0],querysplit[1]); 170 userProfile = GetUserProfile(querysplit[0], querysplit[1]);
169 if (userProfile == null) 171 if (userProfile == null)
170 { 172 {
171 return CreateUnknownUserErrorResponse(); 173 return CreateUnknownUserErrorResponse();
@@ -196,11 +198,11 @@ namespace OpenSim.Grid.UserServer
196 LLUUID guess = new LLUUID(); 198 LLUUID guess = new LLUUID();
197 try 199 try
198 { 200 {
199 guess = new LLUUID((string)requestData["avatar_uuid"]); 201 guess = new LLUUID((string) requestData["avatar_uuid"]);
200 202
201 userProfile = GetUserProfile(guess); 203 userProfile = GetUserProfile(guess);
202 } 204 }
203 catch (System.FormatException) 205 catch (FormatException)
204 { 206 {
205 return CreateUnknownUserErrorResponse(); 207 return CreateUnknownUserErrorResponse();
206 } 208 }
@@ -231,9 +233,9 @@ namespace OpenSim.Grid.UserServer
231 throw new Exception("The method or operation is not implemented."); 233 throw new Exception("The method or operation is not implemented.");
232 } 234 }
233 235
234 public override UserProfileData SetupMasterUser(libsecondlife.LLUUID uuid) 236 public override UserProfileData SetupMasterUser(LLUUID uuid)
235 { 237 {
236 throw new Exception("The method or operation is not implemented."); 238 throw new Exception("The method or operation is not implemented.");
237 } 239 }
238 } 240 }
239} 241} \ No newline at end of file