This hopefully fixes all issues with online/offline notifications across grids. http://opensimulator.org/mantis/view.php?id=5528

This commit is contained in:
Diva Canto
2011-06-07 19:36:04 -07:00
parent 02b40670be
commit 3307db5d4a
6 changed files with 99 additions and 16 deletions

View File

@@ -237,10 +237,20 @@ namespace OpenSim.Server.Handlers.Hypergrid
bool online = false;
bool.TryParse(requestData["online"].ToString(), out online);
hash["result"] = "true";
// let's spawn a thread for this, because it may take a long time...
Util.FireAndForget(delegate { m_HomeUsersService.StatusNotification(ids, userID, online); });
List<UUID> friendsOnline = m_HomeUsersService.StatusNotification(ids, userID, online);
if (friendsOnline.Count > 0)
{
int i = 0;
foreach (UUID id in friendsOnline)
{
hash["friend_" + i.ToString()] = id.ToString();
i++;
}
}
else
hash["result"] = "No Friends Online";
}
XmlRpcResponse response = new XmlRpcResponse();