mirror of
https://github.com/opensim/opensim.git
synced 2026-08-08 02:05:34 +08:00
take friends out of onMakeRoot if crossing
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user