aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--OpenSim/Region/CoreModules/Avatar/Friends/HGFriendsModule.cs39
1 files changed, 23 insertions, 16 deletions
diff --git a/OpenSim/Region/CoreModules/Avatar/Friends/HGFriendsModule.cs b/OpenSim/Region/CoreModules/Avatar/Friends/HGFriendsModule.cs
index 0fe1134..46b0b84 100644
--- a/OpenSim/Region/CoreModules/Avatar/Friends/HGFriendsModule.cs
+++ b/OpenSim/Region/CoreModules/Avatar/Friends/HGFriendsModule.cs
@@ -261,25 +261,26 @@ namespace OpenSim.Region.CoreModules.Avatar.Friends
261 261
262 // fid is not a UUID... 262 // fid is not a UUID...
263 string url = string.Empty, tmp = string.Empty, f = string.Empty, l = string.Empty; 263 string url = string.Empty, tmp = string.Empty, f = string.Empty, l = string.Empty;
264 m_log.DebugFormat("[YYY]: FID {0}", fid);
265 if (Util.ParseUniversalUserIdentifier(fid, out agentID, out url, out f, out l, out tmp)) 264 if (Util.ParseUniversalUserIdentifier(fid, out agentID, out url, out f, out l, out tmp))
266 { 265 {
267 m_log.DebugFormat("[YYY]: Adding user {0} {1} {2}", f, l, url); 266 if (!agentID.Equals(UUID.Zero))
268 m_uMan.AddUser(agentID, f, l, url);
269
270 string name = m_uMan.GetUserName(agentID);
271 string[] parts = name.Trim().Split(new char[] {' '});
272 if (parts.Length == 2)
273 {
274 first = parts[0];
275 last = parts[1];
276 }
277 else
278 { 267 {
279 first = f; 268 m_uMan.AddUser(agentID, f, l, url);
280 last = l; 269
270 string name = m_uMan.GetUserName(agentID);
271 string[] parts = name.Trim().Split(new char[] { ' ' });
272 if (parts.Length == 2)
273 {
274 first = parts[0];
275 last = parts[1];
276 }
277 else
278 {
279 first = f;
280 last = l;
281 }
282 return true;
281 } 283 }
282 return true;
283 } 284 }
284 return false; 285 return false;
285 } 286 }
@@ -744,7 +745,13 @@ namespace OpenSim.Region.CoreModules.Avatar.Friends
744 { 745 {
745 string[] parts = im.fromAgentName.Split(new char[] { '@' }); 746 string[] parts = im.fromAgentName.Split(new char[] { '@' });
746 if (parts.Length == 2) 747 if (parts.Length == 2)
747 m_uMan.AddUser(new UUID(im.fromAgentID), parts[0], "http://" + parts[1]); 748 {
749 string[] fl = parts[0].Trim().Split(new char[] { '.' });
750 if (fl.Length == 2)
751 m_uMan.AddUser(new UUID(im.fromAgentID), fl[0], fl[1], "http://" + parts[1]);
752 else
753 m_uMan.AddUser(new UUID(im.fromAgentID), fl[0], "", "http://" + parts[1]);
754 }
748 } 755 }
749 return true; 756 return true;
750 } 757 }