diff options
Diffstat (limited to 'OpenSim/Region/CoreModules/Avatar/Groups/GroupsModule.cs')
-rw-r--r-- | OpenSim/Region/CoreModules/Avatar/Groups/GroupsModule.cs | 35 |
1 files changed, 27 insertions, 8 deletions
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 @@ | |||
25 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | 25 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
26 | */ | 26 | */ |
27 | 27 | ||
28 | using System; | ||
28 | using System.Collections.Generic; | 29 | using System.Collections.Generic; |
29 | using System.Reflection; | 30 | using System.Reflection; |
30 | using log4net; | 31 | using log4net; |
32 | using Mono.Addins; | ||
31 | using Nini.Config; | 33 | using Nini.Config; |
32 | using OpenMetaverse; | 34 | using OpenMetaverse; |
33 | using OpenSim.Framework; | 35 | using OpenSim.Framework; |
@@ -36,7 +38,8 @@ using OpenSim.Region.Framework.Scenes; | |||
36 | 38 | ||
37 | namespace OpenSim.Region.CoreModules.Avatar.Groups | 39 | namespace OpenSim.Region.CoreModules.Avatar.Groups |
38 | { | 40 | { |
39 | public class GroupsModule : IRegionModule | 41 | [Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule")] |
42 | public class GroupsModule : ISharedRegionModule | ||
40 | { | 43 | { |
41 | private static readonly ILog m_log = | 44 | private static readonly ILog m_log = |
42 | LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); | 45 | LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); |
@@ -55,9 +58,9 @@ namespace OpenSim.Region.CoreModules.Avatar.Groups | |||
55 | private static GroupMembershipData osGroup = | 58 | private static GroupMembershipData osGroup = |
56 | new GroupMembershipData(); | 59 | new GroupMembershipData(); |
57 | 60 | ||
58 | #region IRegionModule Members | 61 | #region ISharedRegionModule Members |
59 | 62 | ||
60 | public void Initialise(Scene scene, IConfigSource config) | 63 | public void Initialise(IConfigSource config) |
61 | { | 64 | { |
62 | IConfig groupsConfig = config.Configs["Groups"]; | 65 | IConfig groupsConfig = config.Configs["Groups"]; |
63 | 66 | ||
@@ -76,7 +79,15 @@ namespace OpenSim.Region.CoreModules.Avatar.Groups | |||
76 | if (groupsConfig.GetString("Module", "Default") != "Default") | 79 | if (groupsConfig.GetString("Module", "Default") != "Default") |
77 | return; | 80 | return; |
78 | } | 81 | } |
82 | } | ||
83 | |||
84 | public Type ReplaceableInterface | ||
85 | { | ||
86 | get { return null; } | ||
87 | } | ||
79 | 88 | ||
89 | public void AddRegion(Scene scene) | ||
90 | { | ||
80 | lock (m_SceneList) | 91 | lock (m_SceneList) |
81 | { | 92 | { |
82 | if (!m_SceneList.Contains(scene)) | 93 | if (!m_SceneList.Contains(scene)) |
@@ -99,6 +110,19 @@ namespace OpenSim.Region.CoreModules.Avatar.Groups | |||
99 | scene.EventManager.OnIncomingInstantMessage += OnGridInstantMessage; | 110 | scene.EventManager.OnIncomingInstantMessage += OnGridInstantMessage; |
100 | } | 111 | } |
101 | 112 | ||
113 | public void RegionLoaded(Scene scene) | ||
114 | { | ||
115 | } | ||
116 | |||
117 | public void RemoveRegion(Scene scene) | ||
118 | { | ||
119 | if (m_SceneList.Contains(scene)) | ||
120 | m_SceneList.Remove(scene); | ||
121 | scene.EventManager.OnNewClient -= OnNewClient; | ||
122 | scene.EventManager.OnClientClosed -= OnClientClosed; | ||
123 | scene.EventManager.OnIncomingInstantMessage -= OnGridInstantMessage; | ||
124 | } | ||
125 | |||
102 | public void PostInitialise() | 126 | public void PostInitialise() |
103 | { | 127 | { |
104 | } | 128 | } |
@@ -123,11 +147,6 @@ namespace OpenSim.Region.CoreModules.Avatar.Groups | |||
123 | get { return "GroupsModule"; } | 147 | get { return "GroupsModule"; } |
124 | } | 148 | } |
125 | 149 | ||
126 | public bool IsSharedModule | ||
127 | { | ||
128 | get { return true; } | ||
129 | } | ||
130 | |||
131 | #endregion | 150 | #endregion |
132 | 151 | ||
133 | private void OnNewClient(IClientAPI client) | 152 | private void OnNewClient(IClientAPI client) |