A few more cleanups on the way to close http://opensimulator.org/mantis/view.php?id=5516 once and for all. Moral of the story: don't send AgentOnline/Offline to viewers with a zero-length array.
parent
e1ca77a0db
commit
06e254c392
|
@ -280,10 +280,9 @@ namespace OpenSim.Region.CoreModules.Avatar.Friends
|
|||
List<string> ids = new List<string>();
|
||||
foreach (FriendInfo f in kvp.Value)
|
||||
ids.Add(f.Friend);
|
||||
UserAgentServiceConnector uConn = new UserAgentServiceConnector(kvp.Key, false);
|
||||
UserAgentServiceConnector uConn = new UserAgentServiceConnector(kvp.Key);
|
||||
List<UUID> friendsOnline = uConn.StatusNotification(ids, userID, online);
|
||||
Thread.Sleep(100);
|
||||
// need to debug this here
|
||||
|
||||
if (online && friendsOnline.Count > 0)
|
||||
{
|
||||
IClientAPI client = LocateClientObject(userID);
|
||||
|
@ -305,15 +304,8 @@ namespace OpenSim.Region.CoreModules.Avatar.Friends
|
|||
if (Util.ParseUniversalUserIdentifier(fid, out agentID, out url, out first, out last, out tmp))
|
||||
{
|
||||
IUserManagement userMan = m_Scenes[0].RequestModuleInterface<IUserManagement>();
|
||||
userMan.AddUser(agentID, url + ";" + first + " " + last);
|
||||
userMan.AddUser(agentID, first, last, url);
|
||||
|
||||
try // our best
|
||||
{
|
||||
string[] parts = userMan.GetUserName(agentID).Split();
|
||||
first = parts[0];
|
||||
last = parts[1];
|
||||
}
|
||||
catch { }
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
|
|
Loading…
Reference in New Issue