mirror of
https://github.com/opensim/opensim.git
synced 2026-08-11 20:05:33 +08:00
Revert "Updates all IRegionModules to the new style region modules."
This reverts commit ec3c31e61e.
This commit is contained in:
@@ -31,7 +31,6 @@ using System.Collections.Generic;
|
||||
using System.Net;
|
||||
using System.Reflection;
|
||||
using log4net;
|
||||
using Mono.Addins;
|
||||
using Nini.Config;
|
||||
using Nwc.XmlRpc;
|
||||
using OpenMetaverse;
|
||||
@@ -82,8 +81,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Friends
|
||||
- Terminate Friendship messages (single)
|
||||
*/
|
||||
|
||||
[Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule")]
|
||||
public class FriendsModule : ISharedRegionModule, IFriendsModule
|
||||
public class FriendsModule : IRegionModule, IFriendsModule
|
||||
{
|
||||
private class Transaction
|
||||
{
|
||||
@@ -113,23 +111,9 @@ namespace OpenSim.Region.CoreModules.Avatar.Friends
|
||||
|
||||
private IGridService m_gridServices = null;
|
||||
|
||||
#region ISharedRegionModule Members
|
||||
#region IRegionModule Members
|
||||
|
||||
public void Initialise(IConfigSource config)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public void PostInitialise()
|
||||
{
|
||||
}
|
||||
|
||||
public Type ReplaceableInterface
|
||||
{
|
||||
get { return null; }
|
||||
}
|
||||
|
||||
public void AddRegion(Scene scene)
|
||||
public void Initialise(Scene scene, IConfigSource config)
|
||||
{
|
||||
lock (m_scenes)
|
||||
{
|
||||
@@ -144,9 +128,9 @@ namespace OpenSim.Region.CoreModules.Avatar.Friends
|
||||
if (!m_scenes.ContainsKey(scene.RegionInfo.RegionHandle))
|
||||
m_scenes[scene.RegionInfo.RegionHandle] = scene;
|
||||
}
|
||||
|
||||
|
||||
scene.RegisterModuleInterface<IFriendsModule>(this);
|
||||
|
||||
|
||||
scene.EventManager.OnNewClient += OnNewClient;
|
||||
scene.EventManager.OnIncomingInstantMessage += OnGridInstantMessage;
|
||||
scene.EventManager.OnAvatarEnteringNewParcel += AvatarEnteringParcel;
|
||||
@@ -154,34 +138,17 @@ namespace OpenSim.Region.CoreModules.Avatar.Friends
|
||||
scene.EventManager.OnClientClosed += ClientClosed;
|
||||
}
|
||||
|
||||
public void RegionLoaded(Scene scene)
|
||||
public void PostInitialise()
|
||||
{
|
||||
if (m_scenes.Count > 0)
|
||||
{
|
||||
m_TransferModule = scene.RequestModuleInterface<IMessageTransferModule>();
|
||||
m_gridServices = scene.GridService;
|
||||
m_TransferModule = m_initialScene.RequestModuleInterface<IMessageTransferModule>();
|
||||
m_gridServices = m_initialScene.GridService;
|
||||
}
|
||||
if (m_TransferModule == null)
|
||||
m_log.Error("[FRIENDS]: Unable to find a message transfer module, friendship offers will not work");
|
||||
}
|
||||
|
||||
public void RemoveRegion(Scene scene)
|
||||
{
|
||||
MainServer.Instance.RemoveXmlRPCHandler("presence_update_bulk");
|
||||
MainServer.Instance.RemoveXmlRPCHandler("terminate_friend");
|
||||
|
||||
if (m_scenes.ContainsKey(scene.RegionInfo.RegionHandle))
|
||||
m_scenes.Remove(scene.RegionInfo.RegionHandle);
|
||||
|
||||
scene.UnregisterModuleInterface<IFriendsModule>(this);
|
||||
|
||||
scene.EventManager.OnNewClient -= OnNewClient;
|
||||
scene.EventManager.OnIncomingInstantMessage -= OnGridInstantMessage;
|
||||
scene.EventManager.OnAvatarEnteringNewParcel -= AvatarEnteringParcel;
|
||||
scene.EventManager.OnMakeChildAgent -= MakeChildAgent;
|
||||
scene.EventManager.OnClientClosed -= ClientClosed;
|
||||
}
|
||||
|
||||
public void Close()
|
||||
{
|
||||
}
|
||||
@@ -191,6 +158,11 @@ namespace OpenSim.Region.CoreModules.Avatar.Friends
|
||||
get { return "FriendsModule"; }
|
||||
}
|
||||
|
||||
public bool IsSharedModule
|
||||
{
|
||||
get { return true; }
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region IInterregionFriendsComms
|
||||
|
||||
Reference in New Issue
Block a user