aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Communications/OGS1/OGS1UserServices.cs
diff options
context:
space:
mode:
authorlbsa712007-12-27 21:41:48 +0000
committerlbsa712007-12-27 21:41:48 +0000
commitefd90b56b761219af6425b1c7a2cdd3b6ffb4de2 (patch)
treebf5b897e1e3c13211e3e2fc61d30508b94c928c0 /OpenSim/Region/Communications/OGS1/OGS1UserServices.cs
parent* removed always true if (diff)
downloadopensim-SC-efd90b56b761219af6425b1c7a2cdd3b6ffb4de2.zip
opensim-SC-efd90b56b761219af6425b1c7a2cdd3b6ffb4de2.tar.gz
opensim-SC-efd90b56b761219af6425b1c7a2cdd3b6ffb4de2.tar.bz2
opensim-SC-efd90b56b761219af6425b1c7a2cdd3b6ffb4de2.tar.xz
* Optimized usings
* shortened references * Removed redundant 'this' * Normalized EOF
Diffstat (limited to 'OpenSim/Region/Communications/OGS1/OGS1UserServices.cs')
-rw-r--r--OpenSim/Region/Communications/OGS1/OGS1UserServices.cs29
1 files changed, 16 insertions, 13 deletions
diff --git a/OpenSim/Region/Communications/OGS1/OGS1UserServices.cs b/OpenSim/Region/Communications/OGS1/OGS1UserServices.cs
index c1e6ba6..3a2e138 100644
--- a/OpenSim/Region/Communications/OGS1/OGS1UserServices.cs
+++ b/OpenSim/Region/Communications/OGS1/OGS1UserServices.cs
@@ -30,6 +30,7 @@ using System;
30using System.Collections; 30using System.Collections;
31using System.Collections.Generic; 31using System.Collections.Generic;
32using System.Net; 32using System.Net;
33using System.Text.RegularExpressions;
33using libsecondlife; 34using libsecondlife;
34using Nwc.XmlRpc; 35using Nwc.XmlRpc;
35using OpenSim.Framework; 36using OpenSim.Framework;
@@ -50,7 +51,9 @@ namespace OpenSim.Region.Communications.OGS1
50 { 51 {
51 if (data.Contains("error_type")) 52 if (data.Contains("error_type"))
52 { 53 {
53 MainLog.Instance.Warn("GRID", "Error sent by user server when trying to get user profile: (" + data["error_type"] + 54 MainLog.Instance.Warn("GRID",
55 "Error sent by user server when trying to get user profile: (" +
56 data["error_type"] +
54 "): " + data["error_desc"]); 57 "): " + data["error_desc"]);
55 return null; 58 return null;
56 } 59 }
@@ -80,19 +83,19 @@ namespace OpenSim.Region.Communications.OGS1
80 return userData; 83 return userData;
81 } 84 }
82 85
83 public List<AvatarPickerAvatar> ConvertXMLRPCDataToAvatarPickerList(LLUUID queryID,Hashtable data) 86 public List<AvatarPickerAvatar> ConvertXMLRPCDataToAvatarPickerList(LLUUID queryID, Hashtable data)
84 { 87 {
85 List<AvatarPickerAvatar> pickerlist = new List<AvatarPickerAvatar>(); 88 List<AvatarPickerAvatar> pickerlist = new List<AvatarPickerAvatar>();
86 int pickercount = Convert.ToInt32((string)data["avcount"]); 89 int pickercount = Convert.ToInt32((string) data["avcount"]);
87 LLUUID respqueryID = new LLUUID((string)data["queryid"]); 90 LLUUID respqueryID = new LLUUID((string) data["queryid"]);
88 if (queryID == respqueryID) 91 if (queryID == respqueryID)
89 { 92 {
90 for (int i = 0; i < pickercount; i++) 93 for (int i = 0; i < pickercount; i++)
91 { 94 {
92 AvatarPickerAvatar apicker = new AvatarPickerAvatar(); 95 AvatarPickerAvatar apicker = new AvatarPickerAvatar();
93 LLUUID avatarID = new LLUUID((string)data["avatarid" + i.ToString()]); 96 LLUUID avatarID = new LLUUID((string) data["avatarid" + i.ToString()]);
94 string firstname = (string)data["firstname" + i.ToString()]; 97 string firstname = (string) data["firstname" + i.ToString()];
95 string lastname = (string)data["lastname" + i.ToString()]; 98 string lastname = (string) data["lastname" + i.ToString()];
96 apicker.AvatarID = avatarID; 99 apicker.AvatarID = avatarID;
97 apicker.firstName = firstname; 100 apicker.firstName = firstname;
98 apicker.lastName = lastname; 101 apicker.lastName = lastname;
@@ -114,18 +117,18 @@ namespace OpenSim.Region.Communications.OGS1
114 public List<AvatarPickerAvatar> GenerateAgentPickerRequestResponse(LLUUID queryID, string query) 117 public List<AvatarPickerAvatar> GenerateAgentPickerRequestResponse(LLUUID queryID, string query)
115 { 118 {
116 List<AvatarPickerAvatar> pickerlist = new List<AvatarPickerAvatar>(); 119 List<AvatarPickerAvatar> pickerlist = new List<AvatarPickerAvatar>();
117 System.Text.RegularExpressions.Regex objAlphaNumericPattern = new System.Text.RegularExpressions.Regex("[^a-zA-Z0-9 ]"); 120 Regex objAlphaNumericPattern = new Regex("[^a-zA-Z0-9 ]");
118 try 121 try
119 { 122 {
120 Hashtable param = new Hashtable(); 123 Hashtable param = new Hashtable();
121 param["queryid"] = (string)queryID.ToString(); 124 param["queryid"] = (string) queryID.ToString();
122 param["avquery"] = objAlphaNumericPattern.Replace(query, ""); 125 param["avquery"] = objAlphaNumericPattern.Replace(query, "");
123 IList parameters = new ArrayList(); 126 IList parameters = new ArrayList();
124 parameters.Add(param); 127 parameters.Add(param);
125 XmlRpcRequest req = new XmlRpcRequest("get_avatar_picker_avatar", parameters); 128 XmlRpcRequest req = new XmlRpcRequest("get_avatar_picker_avatar", parameters);
126 XmlRpcResponse resp = req.Send(m_parent.NetworkServersInfo.UserURL, 3000); 129 XmlRpcResponse resp = req.Send(m_parent.NetworkServersInfo.UserURL, 3000);
127 Hashtable respData = (Hashtable)resp.Value; 130 Hashtable respData = (Hashtable) resp.Value;
128 pickerlist = ConvertXMLRPCDataToAvatarPickerList(queryID,respData); 131 pickerlist = ConvertXMLRPCDataToAvatarPickerList(queryID, respData);
129 } 132 }
130 catch (WebException e) 133 catch (WebException e)
131 { 134 {
@@ -196,7 +199,7 @@ namespace OpenSim.Region.Communications.OGS1
196 return profile; 199 return profile;
197 } 200 }
198 201
199 public UserProfileData SetupMasterUser(libsecondlife.LLUUID uuid) 202 public UserProfileData SetupMasterUser(LLUUID uuid)
200 { 203 {
201 UserProfileData data = GetUserProfile(uuid); 204 UserProfileData data = GetUserProfile(uuid);
202 if (data == null) 205 if (data == null)
@@ -211,4 +214,4 @@ namespace OpenSim.Region.Communications.OGS1
211 throw new Exception("The method or operation is not implemented."); 214 throw new Exception("The method or operation is not implemented.");
212 } 215 }
213 } 216 }
214} 217} \ No newline at end of file