From ec3c31e61e5e540f822891110df9bc978655bbaf Mon Sep 17 00:00:00 2001 From: Revolution Date: Fri, 22 Jan 2010 18:09:33 -0600 Subject: Updates all IRegionModules to the new style region modules. Signed-off-by: Melanie --- .../Avatar/AvatarFactory/AvatarFactoryModule.cs | 29 +++++++-- .../CoreModules/Avatar/Combat/CombatModule.cs | 32 +++++++-- .../CoreModules/Avatar/Dialog/DialogModule.cs | 32 +++++++-- .../CoreModules/Avatar/Friends/FriendsModule.cs | 54 +++++++++++---- .../CoreModules/Avatar/Gestures/GesturesModule.cs | 30 +++++++-- .../Region/CoreModules/Avatar/Gods/GodsModule.cs | 28 ++++++-- .../CoreModules/Avatar/Groups/GroupsModule.cs | 35 +++++++--- .../Avatar/InstantMessage/InstantMessageModule.cs | 53 ++++++++++----- .../Avatar/InstantMessage/MessageTransferModule.cs | 54 ++++++++++----- .../Avatar/InstantMessage/MuteListModule.cs | 48 +++++++++----- .../Avatar/InstantMessage/OfflineMessageModule.cs | 76 ++++++++++++++-------- .../Avatar/InstantMessage/PresenceModule.cs | 61 +++++++++++------ .../Inventory/Archiver/InventoryArchiverModule.cs | 35 ++++++++-- .../Inventory/Transfer/InventoryTransferModule.cs | 63 +++++++++++++----- .../Region/CoreModules/Avatar/Lure/LureModule.cs | 61 ++++++++++++----- .../CoreModules/Avatar/ObjectCaps/ObjectAdd.cs | 55 ++++++++++------ .../Avatar/Profiles/AvatarProfilesModule.cs | 32 +++++---- 17 files changed, 560 insertions(+), 218 deletions(-) (limited to 'OpenSim/Region/CoreModules/Avatar') diff --git a/OpenSim/Region/CoreModules/Avatar/AvatarFactory/AvatarFactoryModule.cs b/OpenSim/Region/CoreModules/Avatar/AvatarFactory/AvatarFactoryModule.cs index 35c59aa..6bbbd56 100644 --- a/OpenSim/Region/CoreModules/Avatar/AvatarFactory/AvatarFactoryModule.cs +++ b/OpenSim/Region/CoreModules/Avatar/AvatarFactory/AvatarFactoryModule.cs @@ -28,6 +28,7 @@ using System; using System.Reflection; using log4net; +using Mono.Addins; using Nini.Config; using OpenMetaverse; using OpenSim.Framework; @@ -38,7 +39,8 @@ using OpenSim.Services.Interfaces; namespace OpenSim.Region.CoreModules.Avatar.AvatarFactory { - public class AvatarFactoryModule : IAvatarFactory, IRegionModule + [Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule")] + public class AvatarFactoryModule : IAvatarFactory, ISharedRegionModule { private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); private Scene m_scene = null; @@ -75,7 +77,16 @@ namespace OpenSim.Region.CoreModules.Avatar.AvatarFactory return appearance; } - public void Initialise(Scene scene, IConfigSource source) + public void Initialise(IConfigSource source) + { + } + + public Type ReplaceableInterface + { + get { return null; } + } + + public void AddRegion(Scene scene) { scene.RegisterModuleInterface(this); scene.EventManager.OnNewClient += NewClient; @@ -84,9 +95,18 @@ namespace OpenSim.Region.CoreModules.Avatar.AvatarFactory { m_scene = scene; } + } + public void RegionLoaded(Scene scene) + { } + public void RemoveRegion(Scene scene) + { + scene.UnregisterModuleInterface(this); + scene.EventManager.OnNewClient -= NewClient; + } + public void PostInitialise() { } @@ -100,11 +120,6 @@ namespace OpenSim.Region.CoreModules.Avatar.AvatarFactory get { return "Default Avatar Factory"; } } - public bool IsSharedModule - { - get { return false; } - } - public void NewClient(IClientAPI client) { client.OnAvatarNowWearing += AvatarIsWearing; diff --git a/OpenSim/Region/CoreModules/Avatar/Combat/CombatModule.cs b/OpenSim/Region/CoreModules/Avatar/Combat/CombatModule.cs index 61b6d65..b7d12aa 100644 --- a/OpenSim/Region/CoreModules/Avatar/Combat/CombatModule.cs +++ b/OpenSim/Region/CoreModules/Avatar/Combat/CombatModule.cs @@ -27,6 +27,7 @@ using System; using System.Collections.Generic; +using Mono.Addins; using Nini.Config; using OpenSim.Region.Framework.Interfaces; using OpenSim.Region.Framework.Scenes; @@ -34,7 +35,8 @@ using OpenMetaverse; namespace OpenSim.Region.CoreModules.Avatar.Combat.CombatModule { - public class CombatModule : IRegionModule + [Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule")] + public class CombatModule : ISharedRegionModule { //private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); @@ -53,7 +55,17 @@ namespace OpenSim.Region.CoreModules.Avatar.Combat.CombatModule /// /// /// - public void Initialise(Scene scene, IConfigSource config) + public void Initialise(IConfigSource config) + { + + } + + public Type ReplaceableInterface + { + get { return null; } + } + + public void AddRegion(Scene scene) { lock (m_scenel) { @@ -71,6 +83,17 @@ namespace OpenSim.Region.CoreModules.Avatar.Combat.CombatModule scene.EventManager.OnAvatarEnteringNewParcel += AvatarEnteringParcel; } + public void RegionLoaded(Scene scene) + { + } + + public void RemoveRegion(Scene scene) + { + scene.EventManager.OnAvatarKilled -= KillAvatar; + scene.EventManager.OnAvatarEnteringNewParcel -= AvatarEnteringParcel; + m_scenel.Remove(scene.RegionInfo.RegionHandle); + } + public void PostInitialise() { } @@ -84,11 +107,6 @@ namespace OpenSim.Region.CoreModules.Avatar.Combat.CombatModule get { return "CombatModule"; } } - public bool IsSharedModule - { - get { return true; } - } - private void KillAvatar(uint killerObjectLocalID, ScenePresence DeadAvatar) { if (killerObjectLocalID == 0) diff --git a/OpenSim/Region/CoreModules/Avatar/Dialog/DialogModule.cs b/OpenSim/Region/CoreModules/Avatar/Dialog/DialogModule.cs index 72ec869..ecffc7a 100644 --- a/OpenSim/Region/CoreModules/Avatar/Dialog/DialogModule.cs +++ b/OpenSim/Region/CoreModules/Avatar/Dialog/DialogModule.cs @@ -25,9 +25,11 @@ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ +using System; using System.Collections.Generic; using System.Reflection; using log4net; +using Mono.Addins; using Nini.Config; using OpenMetaverse; using OpenSim.Framework; @@ -37,28 +39,46 @@ using OpenSim.Region.Framework.Scenes; namespace OpenSim.Region.CoreModules.Avatar.Dialog { - public class DialogModule : IRegionModule, IDialogModule + [Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule")] + public class DialogModule : ISharedRegionModule, IDialogModule { private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); protected Scene m_scene; - public void Initialise(Scene scene, IConfigSource source) + public void Initialise(IConfigSource source) + { + } + + public Type ReplaceableInterface + { + get { return null; } + } + + public void AddRegion(Scene scene) { m_scene = scene; m_scene.RegisterModuleInterface(this); - + m_scene.AddCommand( this, "alert", "alert ", "Send an alert to a user", HandleAlertConsoleCommand); m_scene.AddCommand( this, "alert general", "alert general ", "Send an alert to everyone", HandleAlertConsoleCommand); } - - public void PostInitialise() {} + + public void RegionLoaded(Scene scene) + { + } + + public void RemoveRegion(Scene scene) + { + scene.UnregisterModuleInterface(this); + } + + public void PostInitialise() { } public void Close() {} public string Name { get { return "Dialog Module"; } } - public bool IsSharedModule { get { return false; } } public void SendAlertToUser(IClientAPI client, string message) { diff --git a/OpenSim/Region/CoreModules/Avatar/Friends/FriendsModule.cs b/OpenSim/Region/CoreModules/Avatar/Friends/FriendsModule.cs index 086d4fe..7254180 100644 --- a/OpenSim/Region/CoreModules/Avatar/Friends/FriendsModule.cs +++ b/OpenSim/Region/CoreModules/Avatar/Friends/FriendsModule.cs @@ -31,6 +31,7 @@ using System.Collections.Generic; using System.Net; using System.Reflection; using log4net; +using Mono.Addins; using Nini.Config; using Nwc.XmlRpc; using OpenMetaverse; @@ -81,7 +82,8 @@ namespace OpenSim.Region.CoreModules.Avatar.Friends - Terminate Friendship messages (single) */ - public class FriendsModule : IRegionModule, IFriendsModule + [Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule")] + public class FriendsModule : ISharedRegionModule, IFriendsModule { private class Transaction { @@ -111,9 +113,23 @@ namespace OpenSim.Region.CoreModules.Avatar.Friends private IGridService m_gridServices = null; - #region IRegionModule Members + #region ISharedRegionModule Members - public void Initialise(Scene scene, IConfigSource config) + public void Initialise(IConfigSource config) + { + + } + + public void PostInitialise() + { + } + + public Type ReplaceableInterface + { + get { return null; } + } + + public void AddRegion(Scene scene) { lock (m_scenes) { @@ -128,9 +144,9 @@ namespace OpenSim.Region.CoreModules.Avatar.Friends if (!m_scenes.ContainsKey(scene.RegionInfo.RegionHandle)) m_scenes[scene.RegionInfo.RegionHandle] = scene; } - + scene.RegisterModuleInterface(this); - + scene.EventManager.OnNewClient += OnNewClient; scene.EventManager.OnIncomingInstantMessage += OnGridInstantMessage; scene.EventManager.OnAvatarEnteringNewParcel += AvatarEnteringParcel; @@ -138,29 +154,41 @@ namespace OpenSim.Region.CoreModules.Avatar.Friends scene.EventManager.OnClientClosed += ClientClosed; } - public void PostInitialise() + public void RegionLoaded(Scene scene) { if (m_scenes.Count > 0) { - m_TransferModule = m_initialScene.RequestModuleInterface(); - m_gridServices = m_initialScene.GridService; + m_TransferModule = scene.RequestModuleInterface(); + m_gridServices = scene.GridService; } if (m_TransferModule == null) m_log.Error("[FRIENDS]: Unable to find a message transfer module, friendship offers will not work"); } - public void Close() + 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(this); + + scene.EventManager.OnNewClient -= OnNewClient; + scene.EventManager.OnIncomingInstantMessage -= OnGridInstantMessage; + scene.EventManager.OnAvatarEnteringNewParcel -= AvatarEnteringParcel; + scene.EventManager.OnMakeChildAgent -= MakeChildAgent; + scene.EventManager.OnClientClosed -= ClientClosed; } - public string Name + public void Close() { - get { return "FriendsModule"; } } - public bool IsSharedModule + public string Name { - get { return true; } + get { return "FriendsModule"; } } #endregion diff --git a/OpenSim/Region/CoreModules/Avatar/Gestures/GesturesModule.cs b/OpenSim/Region/CoreModules/Avatar/Gestures/GesturesModule.cs index 8ce5092..c306f94 100644 --- a/OpenSim/Region/CoreModules/Avatar/Gestures/GesturesModule.cs +++ b/OpenSim/Region/CoreModules/Avatar/Gestures/GesturesModule.cs @@ -25,8 +25,10 @@ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ +using System; using System.Reflection; using log4net; +using Mono.Addins; using Nini.Config; using OpenMetaverse; using OpenSim.Framework; @@ -37,23 +39,41 @@ using OpenSim.Services.Interfaces; namespace OpenSim.Region.CoreModules.Avatar.Gestures { - public class GesturesModule : IRegionModule + [Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule")] + public class GesturesModule : INonSharedRegionModule { private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); protected Scene m_scene; - public void Initialise(Scene scene, IConfigSource source) + public void Initialise(IConfigSource source) + { + } + + public Type ReplaceableInterface + { + get { return null; } + } + + public void AddRegion(Scene scene) { m_scene = scene; - m_scene.EventManager.OnNewClient += OnNewClient; } + + public void RegionLoaded(Scene scene) + { + } + + public void RemoveRegion(Scene scene) + { + if(m_scene == scene) + m_scene = null; + scene.EventManager.OnNewClient -= OnNewClient; + } - public void PostInitialise() {} public void Close() {} public string Name { get { return "Gestures Module"; } } - public bool IsSharedModule { get { return false; } } private void OnNewClient(IClientAPI client) { diff --git a/OpenSim/Region/CoreModules/Avatar/Gods/GodsModule.cs b/OpenSim/Region/CoreModules/Avatar/Gods/GodsModule.cs index 50171a3..3914f2e 100644 --- a/OpenSim/Region/CoreModules/Avatar/Gods/GodsModule.cs +++ b/OpenSim/Region/CoreModules/Avatar/Gods/GodsModule.cs @@ -25,7 +25,9 @@ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ +using System; using System.Collections.Generic; +using Mono.Addins; using Nini.Config; using OpenMetaverse; using OpenSim.Framework; @@ -34,7 +36,8 @@ using OpenSim.Region.Framework.Interfaces; namespace OpenSim.Region.CoreModules.Avatar.Gods { - public class GodsModule : IRegionModule, IGodsModule + [Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule")] + public class GodsModule : INonSharedRegionModule, IGodsModule { /// Special UUID for actions that apply to all agents private static readonly UUID ALL_AGENTS = new UUID("44e87126-e794-4ded-05b3-7c42da3d5cdb"); @@ -42,17 +45,34 @@ namespace OpenSim.Region.CoreModules.Avatar.Gods protected Scene m_scene; protected IDialogModule m_dialogModule; - public void Initialise(Scene scene, IConfigSource source) + public void Initialise(IConfigSource source) + { + + } + + public Type ReplaceableInterface + { + get { return null; } + } + + public void AddRegion(Scene scene) { m_scene = scene; m_dialogModule = m_scene.RequestModuleInterface(); m_scene.RegisterModuleInterface(this); } + + public void RegionLoaded(Scene scene) + { + } + + public void RemoveRegion(Scene scene) + { + scene.UnregisterModuleInterface(this); + } - public void PostInitialise() {} public void Close() {} public string Name { get { return "Gods Module"; } } - public bool IsSharedModule { get { return false; } } public void RequestGodlikePowers( UUID agentID, UUID sessionID, UUID token, bool godLike, IClientAPI controllingClient) diff --git a/OpenSim/Region/CoreModules/Avatar/Groups/GroupsModule.cs b/OpenSim/Region/CoreModules/Avatar/Groups/GroupsModule.cs index 31363e5..7ff8d30 100644 --- a/OpenSim/Region/CoreModules/Avatar/Groups/GroupsModule.cs +++ b/OpenSim/Region/CoreModules/Avatar/Groups/GroupsModule.cs @@ -25,9 +25,11 @@ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ +using System; using System.Collections.Generic; using System.Reflection; using log4net; +using Mono.Addins; using Nini.Config; using OpenMetaverse; using OpenSim.Framework; @@ -36,7 +38,8 @@ using OpenSim.Region.Framework.Scenes; namespace OpenSim.Region.CoreModules.Avatar.Groups { - public class GroupsModule : IRegionModule + [Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule")] + public class GroupsModule : ISharedRegionModule { private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); @@ -55,9 +58,9 @@ namespace OpenSim.Region.CoreModules.Avatar.Groups private static GroupMembershipData osGroup = new GroupMembershipData(); - #region IRegionModule Members + #region ISharedRegionModule Members - public void Initialise(Scene scene, IConfigSource config) + public void Initialise(IConfigSource config) { IConfig groupsConfig = config.Configs["Groups"]; @@ -76,7 +79,15 @@ namespace OpenSim.Region.CoreModules.Avatar.Groups if (groupsConfig.GetString("Module", "Default") != "Default") return; } + } + + public Type ReplaceableInterface + { + get { return null; } + } + public void AddRegion(Scene scene) + { lock (m_SceneList) { if (!m_SceneList.Contains(scene)) @@ -99,6 +110,19 @@ namespace OpenSim.Region.CoreModules.Avatar.Groups scene.EventManager.OnIncomingInstantMessage += OnGridInstantMessage; } + public void RegionLoaded(Scene scene) + { + } + + public void RemoveRegion(Scene scene) + { + if (m_SceneList.Contains(scene)) + m_SceneList.Remove(scene); + scene.EventManager.OnNewClient -= OnNewClient; + scene.EventManager.OnClientClosed -= OnClientClosed; + scene.EventManager.OnIncomingInstantMessage -= OnGridInstantMessage; + } + public void PostInitialise() { } @@ -123,11 +147,6 @@ namespace OpenSim.Region.CoreModules.Avatar.Groups get { return "GroupsModule"; } } - public bool IsSharedModule - { - get { return true; } - } - #endregion private void OnNewClient(IClientAPI client) diff --git a/OpenSim/Region/CoreModules/Avatar/InstantMessage/InstantMessageModule.cs b/OpenSim/Region/CoreModules/Avatar/InstantMessage/InstantMessageModule.cs index 9a68749..e1bde4b 100644 --- a/OpenSim/Region/CoreModules/Avatar/InstantMessage/InstantMessageModule.cs +++ b/OpenSim/Region/CoreModules/Avatar/InstantMessage/InstantMessageModule.cs @@ -24,9 +24,12 @@ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ + +using System; using System.Collections.Generic; using System.Reflection; using log4net; +using Mono.Addins; using Nini.Config; using OpenMetaverse; using OpenSim.Framework; @@ -36,7 +39,8 @@ using OpenSim.Region.Framework.Scenes; namespace OpenSim.Region.CoreModules.Avatar.InstantMessage { - public class InstantMessageModule : IRegionModule + [Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule")] + public class InstantMessageModule : ISharedRegionModule { private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); @@ -47,11 +51,11 @@ namespace OpenSim.Region.CoreModules.Avatar.InstantMessage private readonly List m_scenes = new List(); - #region IRegionModule Members + #region ISharedRegionModule Members private IMessageTransferModule m_TransferModule = null; - public void Initialise(Scene scene, IConfigSource config) + public void Initialise(IConfigSource config) { if (config.Configs["Messaging"] != null) { @@ -62,7 +66,15 @@ namespace OpenSim.Region.CoreModules.Avatar.InstantMessage } m_enabled = true; + } + + public Type ReplaceableInterface + { + get { return null; } + } + public void AddRegion(Scene scene) + { lock (m_scenes) { if (!m_scenes.Contains(scene)) @@ -74,6 +86,27 @@ namespace OpenSim.Region.CoreModules.Avatar.InstantMessage } } + public void RegionLoaded(Scene scene) + { + if (!m_enabled) + return; + + m_TransferModule = + m_scenes[0].RequestModuleInterface(); + + if (m_TransferModule == null) + m_log.Error("[INSTANT MESSAGE]: No message transfer module, " + + "IM will not work!"); + } + + public void RemoveRegion(Scene scene) + { + if (m_scenes.Contains(scene)) + m_scenes.Remove(scene); + scene.EventManager.OnClientConnect -= OnClientConnect; + scene.EventManager.OnIncomingInstantMessage -= OnGridInstantMessage; + } + void OnClientConnect(IClientCore client) { IClientIM clientIM; @@ -85,15 +118,6 @@ namespace OpenSim.Region.CoreModules.Avatar.InstantMessage public void PostInitialise() { - if (!m_enabled) - return; - - m_TransferModule = - m_scenes[0].RequestModuleInterface(); - - if (m_TransferModule == null) - m_log.Error("[INSTANT MESSAGE]: No message transfer module, "+ - "IM will not work!"); } public void Close() @@ -105,11 +129,6 @@ namespace OpenSim.Region.CoreModules.Avatar.InstantMessage get { return "InstantMessageModule"; } } - public bool IsSharedModule - { - get { return true; } - } - #endregion public void OnInstantMessage(IClientAPI client, GridInstantMessage im) diff --git a/OpenSim/Region/CoreModules/Avatar/InstantMessage/MessageTransferModule.cs b/OpenSim/Region/CoreModules/Avatar/InstantMessage/MessageTransferModule.cs index e5159b3..16bdfdd 100644 --- a/OpenSim/Region/CoreModules/Avatar/InstantMessage/MessageTransferModule.cs +++ b/OpenSim/Region/CoreModules/Avatar/InstantMessage/MessageTransferModule.cs @@ -30,6 +30,7 @@ using System.Collections.Generic; using System.Net; using System.Reflection; using log4net; +using Mono.Addins; using Nini.Config; using Nwc.XmlRpc; using OpenMetaverse; @@ -40,7 +41,8 @@ using GridRegion = OpenSim.Services.Interfaces.GridRegion; namespace OpenSim.Region.CoreModules.Avatar.InstantMessage { - public class MessageTransferModule : IRegionModule, IMessageTransferModule + [Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule")] + public class MessageTransferModule : ISharedRegionModule, IMessageTransferModule { private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); @@ -50,8 +52,9 @@ namespace OpenSim.Region.CoreModules.Avatar.InstantMessage protected Dictionary m_UserRegionMap = new Dictionary(); public event UndeliveredMessage OnUndeliveredMessage; + private bool m_enabled = true; - public virtual void Initialise(Scene scene, IConfigSource config) + public virtual void Initialise(IConfigSource config) { IConfig cnf = config.Configs["Messaging"]; if (cnf != null && cnf.GetString( @@ -59,29 +62,51 @@ namespace OpenSim.Region.CoreModules.Avatar.InstantMessage "MessageTransferModule") { m_log.Debug("[MESSAGE TRANSFER]: Disabled by configuration"); - return; + m_enabled = false; } cnf = config.Configs["Startup"]; if (cnf != null) m_Gridmode = cnf.GetBoolean("gridmode", false); + } - // m_Enabled = true; + public Type ReplaceableInterface + { + get { return null; } + } - lock (m_Scenes) + public void AddRegion(Scene scene) + { + if (m_enabled) { - if (m_Scenes.Count == 0) + lock (m_Scenes) { - MainServer.Instance.AddXmlRPCHandler( - "grid_instant_message", processXMLRPCGridInstantMessage); - } + if (m_Scenes.Count == 0) + { + MainServer.Instance.AddXmlRPCHandler( + "grid_instant_message", processXMLRPCGridInstantMessage); + } - m_log.Debug("[MESSAGE TRANSFER]: Message transfer module active"); - scene.RegisterModuleInterface(this); - m_Scenes.Add(scene); + m_log.Debug("[MESSAGE TRANSFER]: Message transfer module active"); + scene.RegisterModuleInterface(this); + m_Scenes.Add(scene); + } } } + public void RegionLoaded(Scene scene) + { + } + + public void RemoveRegion(Scene scene) + { + if (m_Scenes.Contains(scene)) + m_Scenes.Remove(scene); + MainServer.Instance.RemoveXmlRPCHandler( + "grid_instant_message"); + scene.UnregisterModuleInterface(this); + } + public virtual void PostInitialise() { } @@ -95,11 +120,6 @@ namespace OpenSim.Region.CoreModules.Avatar.InstantMessage get { return "MessageTransferModule"; } } - public virtual bool IsSharedModule - { - get { return true; } - } - public virtual void SendInstantMessage(GridInstantMessage im, MessageResultNotification result) { UUID toAgentID = new UUID(im.toAgentID); diff --git a/OpenSim/Region/CoreModules/Avatar/InstantMessage/MuteListModule.cs b/OpenSim/Region/CoreModules/Avatar/InstantMessage/MuteListModule.cs index 2d4a635..3570495 100644 --- a/OpenSim/Region/CoreModules/Avatar/InstantMessage/MuteListModule.cs +++ b/OpenSim/Region/CoreModules/Avatar/InstantMessage/MuteListModule.cs @@ -28,6 +28,7 @@ using System; using System.Collections.Generic; using System.Reflection; using log4net; +using Mono.Addins; using Nini.Config; using OpenMetaverse; using OpenSim.Framework; @@ -39,7 +40,8 @@ using OpenSim.Region.Framework.Scenes; namespace OpenSim.Region.CoreModules.Avatar.MuteList { - public class MuteListModule : IRegionModule + [Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule")] + public class MuteListModule : ISharedRegionModule { private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); @@ -47,7 +49,7 @@ namespace OpenSim.Region.CoreModules.Avatar.MuteList private List m_SceneList = new List(); private string m_RestURL = String.Empty; - public void Initialise(Scene scene, IConfigSource config) + public void Initialise(IConfigSource config) { if (!enabled) return; @@ -66,19 +68,24 @@ namespace OpenSim.Region.CoreModules.Avatar.MuteList enabled = false; return; } + m_RestURL = cnf.GetString("MuteListURL", ""); + if (m_RestURL == "") + { + m_log.Error("[MUTE LIST] Module was enabled, but no URL is given, disabling"); + enabled = false; + return; + } + } + public Type ReplaceableInterface + { + get { return null; } + } + + public void AddRegion(Scene scene) + { lock (m_SceneList) { - if (m_SceneList.Count == 0) - { - m_RestURL = cnf.GetString("MuteListURL", ""); - if (m_RestURL == "") - { - m_log.Error("[MUTE LIST] Module was enabled, but no URL is given, disabling"); - enabled = false; - return; - } - } if (!m_SceneList.Contains(scene)) m_SceneList.Add(scene); @@ -86,6 +93,18 @@ namespace OpenSim.Region.CoreModules.Avatar.MuteList } } + public void RegionLoaded(Scene scene) + { + } + + public void RemoveRegion(Scene scene) + { + if (m_SceneList.Contains(scene)) + m_SceneList.Remove(scene); + + scene.EventManager.OnNewClient -= OnNewClient; + } + public void PostInitialise() { if (!enabled) @@ -102,11 +121,6 @@ namespace OpenSim.Region.CoreModules.Avatar.MuteList get { return "MuteListModule"; } } - public bool IsSharedModule - { - get { return true; } - } - public void Close() { } diff --git a/OpenSim/Region/CoreModules/Avatar/InstantMessage/OfflineMessageModule.cs b/OpenSim/Region/CoreModules/Avatar/InstantMessage/OfflineMessageModule.cs index 450897c..6c4d0bf 100644 --- a/OpenSim/Region/CoreModules/Avatar/InstantMessage/OfflineMessageModule.cs +++ b/OpenSim/Region/CoreModules/Avatar/InstantMessage/OfflineMessageModule.cs @@ -28,6 +28,7 @@ using System; using System.Collections.Generic; using System.Reflection; using log4net; +using Mono.Addins; using Nini.Config; using OpenMetaverse; using OpenSim.Framework; @@ -40,7 +41,8 @@ using OpenSim.Region.Framework.Scenes; namespace OpenSim.Region.CoreModules.Avatar.InstantMessage { - public class OfflineMessageModule : IRegionModule + [Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule")] + public class OfflineMessageModule : ISharedRegionModule { private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); @@ -49,7 +51,7 @@ namespace OpenSim.Region.CoreModules.Avatar.InstantMessage private string m_RestURL = String.Empty; private bool m_ForwardOfflineGroupMessages = true; - public void Initialise(Scene scene, IConfigSource config) + public void Initialise(IConfigSource config) { if (!enabled) return; @@ -83,14 +85,23 @@ namespace OpenSim.Region.CoreModules.Avatar.InstantMessage return; } } - if (!m_SceneList.Contains(scene)) - m_SceneList.Add(scene); - - scene.EventManager.OnNewClient += OnNewClient; } } - public void PostInitialise() + public Type ReplaceableInterface + { + get { return null; } + } + + public void AddRegion(Scene scene) + { + if (!m_SceneList.Contains(scene)) + m_SceneList.Add(scene); + + scene.EventManager.OnNewClient += OnNewClient; + } + + public void RegionLoaded(Scene scene) { if (!enabled) return; @@ -120,16 +131,22 @@ namespace OpenSim.Region.CoreModules.Avatar.InstantMessage m_log.Debug("[OFFLINE MESSAGING] Offline messages enabled"); } - public string Name + public void RemoveRegion(Scene scene) { - get { return "OfflineMessageModule"; } + if (m_SceneList.Contains(scene)) + m_SceneList.Remove(scene); + scene.EventManager.OnNewClient -= OnNewClient; } - public bool IsSharedModule + public void PostInitialise() + { + } + + public string Name { - get { return true; } + get { return "OfflineMessageModule"; } } - + public void Close() { } @@ -163,24 +180,27 @@ namespace OpenSim.Region.CoreModules.Avatar.InstantMessage private void RetrieveInstantMessages(IClientAPI client) { - m_log.DebugFormat("[OFFLINE MESSAGING] Retrieving stored messages for {0}", client.AgentId); + if (m_RestURL != "") + { + m_log.DebugFormat("[OFFLINE MESSAGING] Retrieving stored messages for {0}", client.AgentId); - Listmsglist = SynchronousRestObjectPoster.BeginPostObject>( - "POST", m_RestURL+"/RetrieveMessages/", client.AgentId); + List msglist = SynchronousRestObjectPoster.BeginPostObject>( + "POST", m_RestURL + "/RetrieveMessages/", client.AgentId); - foreach (GridInstantMessage im in msglist) - { - // client.SendInstantMessage(im); - - // Send through scene event manager so all modules get a chance - // to look at this message before it gets delivered. - // - // Needed for proper state management for stored group - // invitations - // - Scene s = FindScene(client.AgentId); - if (s != null) - s.EventManager.TriggerIncomingInstantMessage(im); + foreach (GridInstantMessage im in msglist) + { + // client.SendInstantMessage(im); + + // Send through scene event manager so all modules get a chance + // to look at this message before it gets delivered. + // + // Needed for proper state management for stored group + // invitations + // + Scene s = FindScene(client.AgentId); + if (s != null) + s.EventManager.TriggerIncomingInstantMessage(im); + } } } diff --git a/OpenSim/Region/CoreModules/Avatar/InstantMessage/PresenceModule.cs b/OpenSim/Region/CoreModules/Avatar/InstantMessage/PresenceModule.cs index f5ab454..f5498f4 100644 --- a/OpenSim/Region/CoreModules/Avatar/InstantMessage/PresenceModule.cs +++ b/OpenSim/Region/CoreModules/Avatar/InstantMessage/PresenceModule.cs @@ -24,11 +24,14 @@ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ + +using System; using System.Collections; using System.Collections.Generic; using System.Net; using System.Reflection; using log4net; +using Mono.Addins; using Nini.Config; using Nwc.XmlRpc; using OpenMetaverse; @@ -39,7 +42,8 @@ using GridRegion = OpenSim.Services.Interfaces.GridRegion; namespace OpenSim.Region.CoreModules.Avatar.InstantMessage { - public class PresenceModule : IRegionModule, IPresenceModule + [Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule")] + public class PresenceModule : ISharedRegionModule, IPresenceModule { private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); @@ -59,7 +63,7 @@ namespace OpenSim.Region.CoreModules.Avatar.InstantMessage public event PresenceChange OnPresenceChange; public event BulkPresenceData OnBulkPresenceData; - public void Initialise(Scene scene, IConfigSource config) + public void Initialise(IConfigSource config) { lock (m_Scenes) { @@ -78,28 +82,38 @@ namespace OpenSim.Region.CoreModules.Avatar.InstantMessage m_Gridmode = cnf.GetBoolean("gridmode", false); m_Enabled = true; - - m_initialScene = scene; } + } + } + + public Type ReplaceableInterface + { + get { return null; } + } + public void AddRegion(Scene scene) + { + if (m_Enabled) + { + m_initialScene = scene; if (m_Gridmode) NotifyMessageServerOfStartup(scene); m_Scenes.Add(scene); - } - scene.RegisterModuleInterface(this); + scene.RegisterModuleInterface(this); - scene.EventManager.OnNewClient += OnNewClient; - scene.EventManager.OnSetRootAgentScene += OnSetRootAgentScene; - scene.EventManager.OnMakeChildAgent += OnMakeChildAgent; + scene.EventManager.OnNewClient += OnNewClient; + scene.EventManager.OnSetRootAgentScene += OnSetRootAgentScene; + scene.EventManager.OnMakeChildAgent += OnMakeChildAgent; + } } - public void PostInitialise() + public void RegionLoaded(Scene scene) { } - public void Close() + public void RemoveRegion(Scene scene) { if (!m_Gridmode || !m_Enabled) return; @@ -116,21 +130,28 @@ namespace OpenSim.Region.CoreModules.Avatar.InstantMessage } } - lock (m_Scenes) - { - foreach (Scene scene in m_Scenes) - NotifyMessageServerOfShutdown(scene); - } + NotifyMessageServerOfShutdown(scene); + if(m_Scenes.Contains(scene)) + m_Scenes.Remove(scene); + + scene.UnregisterModuleInterface(this); + + scene.EventManager.OnNewClient -= OnNewClient; + scene.EventManager.OnSetRootAgentScene -= OnSetRootAgentScene; + scene.EventManager.OnMakeChildAgent -= OnMakeChildAgent; } - public string Name + public void PostInitialise() { - get { return "PresenceModule"; } } - public bool IsSharedModule + public void Close() { - get { return true; } + } + + public string Name + { + get { return "PresenceModule"; } } public void RequestBulkPresenceData(UUID[] users) diff --git a/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/InventoryArchiverModule.cs b/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/InventoryArchiverModule.cs index ecd60bd..a04ab22 100644 --- a/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/InventoryArchiverModule.cs +++ b/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/InventoryArchiverModule.cs @@ -30,6 +30,7 @@ using System.Collections.Generic; using System.IO; using System.Reflection; using log4net; +using Mono.Addins; using Nini.Config; using OpenMetaverse; using OpenSim.Framework; @@ -41,10 +42,11 @@ using OpenSim.Services.Interfaces; namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver { + [Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule")] /// /// This module loads and saves OpenSimulator inventory archives /// - public class InventoryArchiverModule : IRegionModule, IInventoryArchiverModule + public class InventoryArchiverModule : ISharedRegionModule, IInventoryArchiverModule { private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); @@ -82,18 +84,28 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver DisablePresenceChecks = disablePresenceChecks; } - public void Initialise(Scene scene, IConfigSource source) + public void Initialise(IConfigSource source) + { + + } + + public Type ReplaceableInterface + { + get { return null; } + } + + public void AddRegion(Scene scene) { if (m_scenes.Count == 0) { scene.RegisterModuleInterface(this); OnInventoryArchiveSaved += SaveInvConsoleCommandCompleted; - + scene.AddCommand( this, "load iar", "load iar []", - "Load user inventory archive.", HandleLoadInvConsoleCommand); - + "Load user inventory archive.", HandleLoadInvConsoleCommand); + scene.AddCommand( this, "save iar", "save iar []", @@ -101,10 +113,21 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver m_aScene = scene; } - + m_scenes[scene.RegionInfo.RegionID] = scene; } + public void RegionLoaded(Scene scene) + { + } + + public void RemoveRegion(Scene scene) + { + scene.UnregisterModuleInterface(this); + if(m_scenes.ContainsKey(scene.RegionInfo.RegionID)) + m_scenes.Remove(scene.RegionInfo.RegionID); + } + public void PostInitialise() {} public void Close() {} diff --git a/OpenSim/Region/CoreModules/Avatar/Inventory/Transfer/InventoryTransferModule.cs b/OpenSim/Region/CoreModules/Avatar/Inventory/Transfer/InventoryTransferModule.cs index d9a021f..44906b4 100644 --- a/OpenSim/Region/CoreModules/Avatar/Inventory/Transfer/InventoryTransferModule.cs +++ b/OpenSim/Region/CoreModules/Avatar/Inventory/Transfer/InventoryTransferModule.cs @@ -29,6 +29,7 @@ using System; using System.Collections.Generic; using System.Reflection; using log4net; +using Mono.Addins; using Nini.Config; using OpenMetaverse; using OpenSim.Framework; @@ -39,7 +40,8 @@ using OpenSim.Services.Interfaces; namespace OpenSim.Region.CoreModules.Avatar.Inventory.Transfer { - public class InventoryTransferModule : IInventoryTransferModule, IRegionModule + [Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule")] + public class InventoryTransferModule : IInventoryTransferModule, ISharedRegionModule { private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); @@ -50,10 +52,11 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Transfer new Dictionary(); private IMessageTransferModule m_TransferModule = null; + private bool m_enabled = true; - #region IRegionModule Members + #region ISharedRegionModule Members - public void Initialise(Scene scene, IConfigSource config) + public void Initialise(IConfigSource config) { if (config.Configs["Messaging"] != null) { @@ -62,31 +65,61 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Transfer if (config.Configs["Messaging"].GetString( "InventoryTransferModule", "InventoryTransferModule") != "InventoryTransferModule") - return; + m_enabled = false; } + } + + public Type ReplaceableInterface + { + get { return null; } + } - if (!m_Scenelist.Contains(scene)) + public void AddRegion(Scene scene) + { + if (m_enabled) { - m_Scenelist.Add(scene); + if (!m_Scenelist.Contains(scene)) + { + m_Scenelist.Add(scene); - scene.RegisterModuleInterface(this); + scene.RegisterModuleInterface(this); - scene.EventManager.OnNewClient += OnNewClient; - scene.EventManager.OnClientClosed += ClientLoggedOut; - scene.EventManager.OnIncomingInstantMessage += OnGridInstantMessage; + scene.EventManager.OnNewClient += OnNewClient; + scene.EventManager.OnClientClosed += ClientLoggedOut; + scene.EventManager.OnIncomingInstantMessage += OnGridInstantMessage; + } } } - public void PostInitialise() + public void RegionLoaded(Scene scene) { - if (m_Scenelist.Count > 0) + if (m_enabled) { - m_TransferModule = m_Scenelist[0].RequestModuleInterface(); - if (m_TransferModule == null) - m_log.Error("[INVENTORY TRANSFER] No Message transfer module found, transfers will be local only"); + if (m_Scenelist.Count > 0) + { + m_TransferModule = m_Scenelist[0].RequestModuleInterface(); + if (m_TransferModule == null) + m_log.Error("[INVENTORY TRANSFER] No Message transfer module found, transfers will be local only"); + } } } + public void RemoveRegion(Scene scene) + { + if (m_Scenelist.Contains(scene)) + m_Scenelist.Remove(scene); + + scene.UnregisterModuleInterface(this); + + scene.EventManager.OnNewClient -= OnNewClient; + scene.EventManager.OnClientClosed -= ClientLoggedOut; + scene.EventManager.OnIncomingInstantMessage -= OnGridInstantMessage; + } + + public void PostInitialise() + { + } + public void Close() { } diff --git a/OpenSim/Region/CoreModules/Avatar/Lure/LureModule.cs b/OpenSim/Region/CoreModules/Avatar/Lure/LureModule.cs index 261bd6c..973d27f 100644 --- a/OpenSim/Region/CoreModules/Avatar/Lure/LureModule.cs +++ b/OpenSim/Region/CoreModules/Avatar/Lure/LureModule.cs @@ -29,6 +29,7 @@ using System; using System.Collections.Generic; using System.Reflection; using log4net; +using Mono.Addins; using Nini.Config; using OpenMetaverse; using OpenSim.Framework; @@ -37,36 +38,72 @@ using OpenSim.Region.Framework.Scenes; namespace OpenSim.Region.CoreModules.Avatar.Lure { - public class LureModule : IRegionModule + [Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule")] + public class LureModule : ISharedRegionModule { private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); private readonly List m_scenes = new List(); + private bool m_enabled = true; + private IMessageTransferModule m_TransferModule = null; - public void Initialise(Scene scene, IConfigSource config) + public void Initialise(IConfigSource config) { if (config.Configs["Messaging"] != null) { if (config.Configs["Messaging"].GetString( "LureModule", "LureModule") != "LureModule") - return; + m_enabled = false; } + } + + public Type ReplaceableInterface + { + get { return null; } + } - lock (m_scenes) + public void AddRegion(Scene scene) + { + if (m_enabled) { - if (!m_scenes.Contains(scene)) + lock (m_scenes) { - m_scenes.Add(scene); - scene.EventManager.OnNewClient += OnNewClient; - scene.EventManager.OnIncomingInstantMessage += - OnGridInstantMessage; + if (!m_scenes.Contains(scene)) + { + m_scenes.Add(scene); + scene.EventManager.OnNewClient += OnNewClient; + scene.EventManager.OnIncomingInstantMessage += + OnGridInstantMessage; + } } } } + public void RegionLoaded(Scene scene) + { + if (m_enabled) + { + m_TransferModule = + m_scenes[0].RequestModuleInterface(); + + if (m_TransferModule == null) + m_log.Error("[INSTANT MESSAGE]: No message transfer module, " + + "lures will not work!"); + } + } + + public void RemoveRegion(Scene scene) + { + if (m_scenes.Contains(scene)) + m_scenes.Remove(scene); + scene.EventManager.OnNewClient -= OnNewClient; + scene.EventManager.OnIncomingInstantMessage -= + OnGridInstantMessage; + } + void OnNewClient(IClientAPI client) { client.OnInstantMessage += OnInstantMessage; @@ -76,12 +113,6 @@ namespace OpenSim.Region.CoreModules.Avatar.Lure public void PostInitialise() { - m_TransferModule = - m_scenes[0].RequestModuleInterface(); - - if (m_TransferModule == null) - m_log.Error("[INSTANT MESSAGE]: No message transfer module, "+ - "lures will not work!"); } public void Close() diff --git a/OpenSim/Region/CoreModules/Avatar/ObjectCaps/ObjectAdd.cs b/OpenSim/Region/CoreModules/Avatar/ObjectCaps/ObjectAdd.cs index 63a93aa..748b42c 100644 --- a/OpenSim/Region/CoreModules/Avatar/ObjectCaps/ObjectAdd.cs +++ b/OpenSim/Region/CoreModules/Avatar/ObjectCaps/ObjectAdd.cs @@ -29,6 +29,7 @@ using System; using System.Collections; using System.Reflection; using log4net; +using Mono.Addins; using Nini.Config; using OpenMetaverse; using OpenMetaverse.StructuredData; @@ -41,24 +42,54 @@ using Caps=OpenSim.Framework.Capabilities.Caps; namespace OpenSim.Region.CoreModules.Avatar.ObjectCaps { - public class ObjectAdd : IRegionModule + [Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule")] + public class ObjectAdd : ISharedRegionModule { private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); private Scene m_scene; - #region IRegionModule Members + #region ISharedRegionModule Members - public void Initialise(Scene pScene, IConfigSource pSource) + public void Initialise(IConfigSource pSource) { - m_scene = pScene; + + } + + public Type ReplaceableInterface + { + get { return null; } + } + + public void AddRegion(Scene scene) + { + m_scene = scene; m_scene.EventManager.OnRegisterCaps += RegisterCaps; } + public void RegionLoaded(Scene scene) + { + } + + public void RemoveRegion(Scene scene) + { + scene.EventManager.OnRegisterCaps -= RegisterCaps; + } + public void PostInitialise() { } + public void Close() + { + + } + + public string Name + { + get { return "ObjectAddModule"; } + } + public void RegisterCaps(UUID agentID, Caps caps) { UUID capuuid = UUID.Random(); @@ -348,22 +379,6 @@ namespace OpenSim.Region.CoreModules.Avatar.ObjectCaps Array.Reverse(resultbytes); return String.Format("{0}",Convert.ToBase64String(resultbytes)); } - - public void Close() - { - - } - - public string Name - { - get { return "ObjectAddModule"; } - } - - public bool IsSharedModule - { - get { return false; } - } - #endregion } } diff --git a/OpenSim/Region/CoreModules/Avatar/Profiles/AvatarProfilesModule.cs b/OpenSim/Region/CoreModules/Avatar/Profiles/AvatarProfilesModule.cs index 8cf58c6..7fcb0e1 100644 --- a/OpenSim/Region/CoreModules/Avatar/Profiles/AvatarProfilesModule.cs +++ b/OpenSim/Region/CoreModules/Avatar/Profiles/AvatarProfilesModule.cs @@ -30,6 +30,7 @@ using System.Collections; using System.Globalization; using System.Reflection; using log4net; +using Mono.Addins; using Nini.Config; using OpenMetaverse; using OpenSim.Framework; @@ -38,20 +39,17 @@ using OpenSim.Region.Framework.Scenes; namespace OpenSim.Region.CoreModules.Avatar.Profiles { - public class AvatarProfilesModule : IRegionModule + [Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule")] + public class AvatarProfilesModule : INonSharedRegionModule { private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); private Scene m_scene; private IProfileModule m_profileModule = null; private bool m_enabled = true; - public AvatarProfilesModule() - { - } + #region INonSharedRegionModule Members - #region IRegionModule Members - - public void Initialise(Scene scene, IConfigSource config) + public void Initialise(IConfigSource config) { IConfig profileConfig = config.Configs["Profile"]; if (profileConfig != null) @@ -62,30 +60,38 @@ namespace OpenSim.Region.CoreModules.Avatar.Profiles return; } } + } + + public Type ReplaceableInterface + { + get { return null; } + } + public void AddRegion(Scene scene) + { m_scene = scene; m_scene.EventManager.OnNewClient += NewClient; } - public void PostInitialise() + public void RegionLoaded(Scene scene) { if (!m_enabled) return; m_profileModule = m_scene.RequestModuleInterface(); } - public void Close() + public void RemoveRegion(Scene scene) { + scene.EventManager.OnNewClient -= NewClient; } - public string Name + public void Close() { - get { return "AvatarProfilesModule"; } } - public bool IsSharedModule + public string Name { - get { return false; } + get { return "AvatarProfilesModule"; } } #endregion -- cgit v1.1