Move requestonlinenotification generic message to presence module
parent
6f770af5fb
commit
0ab65899e4
|
@ -211,8 +211,6 @@ namespace OpenSim.Region.CoreModules.Avatar.Friends
|
||||||
client.OnLogout += OnLogout;
|
client.OnLogout += OnLogout;
|
||||||
client.OnEconomyDataRequest += SendPresence;
|
client.OnEconomyDataRequest += SendPresence;
|
||||||
|
|
||||||
client.AddGenericPacketHandler("requestonlinenotification", OnRequestOnlineNotification);
|
|
||||||
|
|
||||||
if (m_Friends.ContainsKey(client.AgentId))
|
if (m_Friends.ContainsKey(client.AgentId))
|
||||||
{
|
{
|
||||||
m_Friends[client.AgentId].Refcount++;
|
m_Friends[client.AgentId].Refcount++;
|
||||||
|
@ -531,9 +529,5 @@ namespace OpenSim.Region.CoreModules.Avatar.Friends
|
||||||
m_FriendsSimConnector.GrantRights(region, requester, target);
|
m_FriendsSimConnector.GrantRights(region, requester, target);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public void OnRequestOnlineNotification(Object sender, string method, List<String> args)
|
|
||||||
{
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -36,6 +36,7 @@ using OpenMetaverse;
|
||||||
using OpenSim.Framework;
|
using OpenSim.Framework;
|
||||||
using OpenSim.Region.Framework.Interfaces;
|
using OpenSim.Region.Framework.Interfaces;
|
||||||
using OpenSim.Region.Framework.Scenes;
|
using OpenSim.Region.Framework.Scenes;
|
||||||
|
using OpenSim.Services.Interfaces;
|
||||||
using GridRegion = OpenSim.Services.Interfaces.GridRegion;
|
using GridRegion = OpenSim.Services.Interfaces.GridRegion;
|
||||||
|
|
||||||
namespace OpenSim.Region.CoreModules.Avatar.InstantMessage
|
namespace OpenSim.Region.CoreModules.Avatar.InstantMessage
|
||||||
|
@ -48,12 +49,35 @@ namespace OpenSim.Region.CoreModules.Avatar.InstantMessage
|
||||||
public event PresenceChange OnPresenceChange;
|
public event PresenceChange OnPresenceChange;
|
||||||
public event BulkPresenceData OnBulkPresenceData;
|
public event BulkPresenceData OnBulkPresenceData;
|
||||||
|
|
||||||
|
protected List<Scene> m_Scenes = new List<Scene>();
|
||||||
|
|
||||||
|
protected IPresenceService m_PresenceService = null;
|
||||||
|
|
||||||
|
protected IPresenceService PresenceService
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
if (m_PresenceService == null)
|
||||||
|
{
|
||||||
|
if (m_Scenes.Count > 0)
|
||||||
|
m_PresenceService = m_Scenes[0].RequestModuleInterface<IPresenceService>();
|
||||||
|
}
|
||||||
|
|
||||||
|
return m_PresenceService;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
public void Initialise(IConfigSource config)
|
public void Initialise(IConfigSource config)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
public void AddRegion(Scene scene)
|
public void AddRegion(Scene scene)
|
||||||
{
|
{
|
||||||
|
m_Scenes.Add(scene);
|
||||||
|
|
||||||
|
scene.EventManager.OnNewClient += OnNewClient;
|
||||||
|
|
||||||
|
scene.RegisterModuleInterface<IPresenceModule>(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void RegionLoaded(Scene scene)
|
public void RegionLoaded(Scene scene)
|
||||||
|
@ -62,6 +86,7 @@ namespace OpenSim.Region.CoreModules.Avatar.InstantMessage
|
||||||
|
|
||||||
public void RemoveRegion(Scene scene)
|
public void RemoveRegion(Scene scene)
|
||||||
{
|
{
|
||||||
|
m_Scenes.Remove(scene);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void PostInitialise()
|
public void PostInitialise()
|
||||||
|
@ -87,6 +112,11 @@ namespace OpenSim.Region.CoreModules.Avatar.InstantMessage
|
||||||
}
|
}
|
||||||
|
|
||||||
public void OnNewClient(IClientAPI client)
|
public void OnNewClient(IClientAPI client)
|
||||||
|
{
|
||||||
|
client.AddGenericPacketHandler("requestonlinenotification", OnRequestOnlineNotification);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void OnRequestOnlineNotification(Object sender, string method, List<String> args)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue