aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Framework/Communications/CommunicationsManager.cs
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Framework/Communications/CommunicationsManager.cs')
-rw-r--r--OpenSim/Framework/Communications/CommunicationsManager.cs63
1 files changed, 0 insertions, 63 deletions
diff --git a/OpenSim/Framework/Communications/CommunicationsManager.cs b/OpenSim/Framework/Communications/CommunicationsManager.cs
index 52f6202..d215340 100644
--- a/OpenSim/Framework/Communications/CommunicationsManager.cs
+++ b/OpenSim/Framework/Communications/CommunicationsManager.cs
@@ -135,69 +135,6 @@ namespace OpenSim.Framework.Communications
135 return; 135 return;
136 } 136 }
137 137
138 public void HandleUUIDNameRequest(UUID uuid, IClientAPI remote_client)
139 {
140 if (uuid == m_userProfileCacheService.LibraryRoot.Owner)
141 {
142 remote_client.SendNameReply(uuid, "Mr", "OpenSim");
143 }
144 else
145 {
146 string[] names = doUUIDNameRequest(uuid);
147 if (names.Length == 2)
148 {
149 remote_client.SendNameReply(uuid, names[0], names[1]);
150 }
151
152 }
153 }
154
155 private string[] doUUIDNameRequest(UUID uuid)
156 {
157 lock (m_nameRequestCache)
158 {
159 if (m_nameRequestCache.ContainsKey(uuid))
160 return m_nameRequestCache[uuid];
161 }
162
163 string[] returnstring = new string[0];
164 CachedUserInfo uinfo = UserProfileCacheService.GetUserDetails(uuid);
165
166 if ((uinfo != null) && (uinfo.UserProfile != null))
167 {
168 returnstring = new string[2];
169 returnstring[0] = uinfo.UserProfile.FirstName;
170 returnstring[1] = uinfo.UserProfile.SurName;
171 lock (m_nameRequestCache)
172 {
173 if (!m_nameRequestCache.ContainsKey(uuid))
174 m_nameRequestCache.Add(uuid, returnstring);
175 }
176 }
177
178 return returnstring;
179 }
180
181 public bool UUIDNameCachedTest(UUID uuid)
182 {
183 lock (m_nameRequestCache)
184 return m_nameRequestCache.ContainsKey(uuid);
185 }
186
187 public string UUIDNameRequestString(UUID uuid)
188 {
189 string[] names = doUUIDNameRequest(uuid);
190 if (names.Length == 2)
191 {
192 string firstname = names[0];
193 string lastname = names[1];
194
195 return firstname + " " + lastname;
196
197 }
198 return "(hippos)";
199 }
200
201 public List<AvatarPickerAvatar> GenerateAgentPickerRequestResponse(UUID queryID, string query) 138 public List<AvatarPickerAvatar> GenerateAgentPickerRequestResponse(UUID queryID, string query)
202 { 139 {
203 List<AvatarPickerAvatar> pickerlist = m_userService.GenerateAgentPickerRequestResponse(queryID, query); 140 List<AvatarPickerAvatar> pickerlist = m_userService.GenerateAgentPickerRequestResponse(queryID, query);