take friends out of onMakeRoot if crossing
parent
f19b3d28bd
commit
800044cead
|
@ -217,7 +217,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Friends
|
|||
|
||||
scene.EventManager.OnNewClient += OnNewClient;
|
||||
scene.EventManager.OnClientClosed += OnClientClosed;
|
||||
scene.EventManager.OnMakeRootAgent += OnMakeRootAgent;
|
||||
// scene.EventManager.OnMakeRootAgent += OnMakeRootAgent;
|
||||
scene.EventManager.OnClientLogin += OnClientLogin;
|
||||
}
|
||||
|
||||
|
@ -255,6 +255,23 @@ namespace OpenSim.Region.CoreModules.Avatar.Friends
|
|||
return 0;
|
||||
}
|
||||
|
||||
private void OnMakeRootAgent(ScenePresence sp)
|
||||
{
|
||||
if(sp.gotCrossUpdate)
|
||||
return;
|
||||
|
||||
RecacheFriends(sp.ControllingClient);
|
||||
|
||||
lock (m_NeedsToNotifyStatus)
|
||||
{
|
||||
if (m_NeedsToNotifyStatus.Remove(sp.UUID))
|
||||
{
|
||||
// Inform the friends that this user is online. This can only be done once the client is a Root Agent.
|
||||
StatusChange(sp.UUID, true);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void OnNewClient(IClientAPI client)
|
||||
{
|
||||
client.OnInstantMessage += OnInstantMessage;
|
||||
|
@ -327,20 +344,6 @@ namespace OpenSim.Region.CoreModules.Avatar.Friends
|
|||
}
|
||||
}
|
||||
|
||||
private void OnMakeRootAgent(ScenePresence sp)
|
||||
{
|
||||
RecacheFriends(sp.ControllingClient);
|
||||
|
||||
lock (m_NeedsToNotifyStatus)
|
||||
{
|
||||
if (m_NeedsToNotifyStatus.Remove(sp.UUID))
|
||||
{
|
||||
// Inform the friends that this user is online. This can only be done once the client is a Root Agent.
|
||||
StatusChange(sp.UUID, true);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void OnClientLogin(IClientAPI client)
|
||||
{
|
||||
UUID agentID = client.AgentId;
|
||||
|
@ -359,6 +362,20 @@ namespace OpenSim.Region.CoreModules.Avatar.Friends
|
|||
m_NeedsListOfOnlineFriends.Add(agentID);
|
||||
}
|
||||
|
||||
public void IsNpwRoot(ScenePresence sp)
|
||||
{
|
||||
RecacheFriends(sp.ControllingClient);
|
||||
|
||||
lock (m_NeedsToNotifyStatus)
|
||||
{
|
||||
if (m_NeedsToNotifyStatus.Remove(sp.UUID))
|
||||
{
|
||||
// Inform the friends that this user is online. This can only be done once the client is a Root Agent.
|
||||
StatusChange(sp.UUID, true);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public virtual bool SendFriendsOnlineIfNeeded(IClientAPI client)
|
||||
{
|
||||
UUID agentID = client.AgentId;
|
||||
|
|
|
@ -28,6 +28,7 @@
|
|||
using System.Collections.Generic;
|
||||
using OpenMetaverse;
|
||||
using OpenSim.Framework;
|
||||
using OpenSim.Region.Framework.Scenes;
|
||||
using FriendInfo = OpenSim.Services.Interfaces.FriendInfo;
|
||||
|
||||
namespace OpenSim.Region.Framework.Interfaces
|
||||
|
@ -93,6 +94,7 @@ namespace OpenSim.Region.Framework.Interfaces
|
|||
/// <param name="perms">These come from the FriendRights enum.</param>
|
||||
void GrantRights(IClientAPI remoteClient, UUID friendID, int perms);
|
||||
|
||||
void IsNpwRoot(ScenePresence sp);
|
||||
bool SendFriendsOnlineIfNeeded(IClientAPI client);
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue