aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/CoreModules/Avatar
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region/CoreModules/Avatar')
-rw-r--r--OpenSim/Region/CoreModules/Avatar/AvatarFactory/AvatarFactoryModule.cs29
-rw-r--r--OpenSim/Region/CoreModules/Avatar/Combat/CombatModule.cs32
-rw-r--r--OpenSim/Region/CoreModules/Avatar/Dialog/DialogModule.cs32
-rw-r--r--OpenSim/Region/CoreModules/Avatar/Friends/FriendsModule.cs54
-rw-r--r--OpenSim/Region/CoreModules/Avatar/Gestures/GesturesModule.cs30
-rw-r--r--OpenSim/Region/CoreModules/Avatar/Gods/GodsModule.cs28
-rw-r--r--OpenSim/Region/CoreModules/Avatar/Groups/GroupsModule.cs35
-rw-r--r--OpenSim/Region/CoreModules/Avatar/InstantMessage/InstantMessageModule.cs53
-rw-r--r--OpenSim/Region/CoreModules/Avatar/InstantMessage/MessageTransferModule.cs54
-rw-r--r--OpenSim/Region/CoreModules/Avatar/InstantMessage/MuteListModule.cs48
-rw-r--r--OpenSim/Region/CoreModules/Avatar/InstantMessage/OfflineMessageModule.cs41
-rw-r--r--OpenSim/Region/CoreModules/Avatar/InstantMessage/PresenceModule.cs61
-rw-r--r--OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/InventoryArchiverModule.cs35
-rw-r--r--OpenSim/Region/CoreModules/Avatar/Inventory/Transfer/InventoryTransferModule.cs63
-rw-r--r--OpenSim/Region/CoreModules/Avatar/Lure/LureModule.cs61
-rw-r--r--OpenSim/Region/CoreModules/Avatar/ObjectCaps/ObjectAdd.cs55
-rw-r--r--OpenSim/Region/CoreModules/Avatar/Profiles/AvatarProfilesModule.cs32
17 files changed, 202 insertions, 541 deletions
diff --git a/OpenSim/Region/CoreModules/Avatar/AvatarFactory/AvatarFactoryModule.cs b/OpenSim/Region/CoreModules/Avatar/AvatarFactory/AvatarFactoryModule.cs
index 6bbbd56..35c59aa 100644
--- a/OpenSim/Region/CoreModules/Avatar/AvatarFactory/AvatarFactoryModule.cs
+++ b/OpenSim/Region/CoreModules/Avatar/AvatarFactory/AvatarFactoryModule.cs
@@ -28,7 +28,6 @@
28using System; 28using System;
29using System.Reflection; 29using System.Reflection;
30using log4net; 30using log4net;
31using Mono.Addins;
32using Nini.Config; 31using Nini.Config;
33using OpenMetaverse; 32using OpenMetaverse;
34using OpenSim.Framework; 33using OpenSim.Framework;
@@ -39,8 +38,7 @@ using OpenSim.Services.Interfaces;
39 38
40namespace OpenSim.Region.CoreModules.Avatar.AvatarFactory 39namespace OpenSim.Region.CoreModules.Avatar.AvatarFactory
41{ 40{
42 [Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule")] 41 public class AvatarFactoryModule : IAvatarFactory, IRegionModule
43 public class AvatarFactoryModule : IAvatarFactory, ISharedRegionModule
44 { 42 {
45 private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); 43 private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
46 private Scene m_scene = null; 44 private Scene m_scene = null;
@@ -77,16 +75,7 @@ namespace OpenSim.Region.CoreModules.Avatar.AvatarFactory
77 return appearance; 75 return appearance;
78 } 76 }
79 77
80 public void Initialise(IConfigSource source) 78 public void Initialise(Scene scene, IConfigSource source)
81 {
82 }
83
84 public Type ReplaceableInterface
85 {
86 get { return null; }
87 }
88
89 public void AddRegion(Scene scene)
90 { 79 {
91 scene.RegisterModuleInterface<IAvatarFactory>(this); 80 scene.RegisterModuleInterface<IAvatarFactory>(this);
92 scene.EventManager.OnNewClient += NewClient; 81 scene.EventManager.OnNewClient += NewClient;
@@ -95,18 +84,9 @@ namespace OpenSim.Region.CoreModules.Avatar.AvatarFactory
95 { 84 {
96 m_scene = scene; 85 m_scene = scene;
97 } 86 }
98 }
99 87
100 public void RegionLoaded(Scene scene)
101 {
102 } 88 }
103 89
104 public void RemoveRegion(Scene scene)
105 {
106 scene.UnregisterModuleInterface<IAvatarFactory>(this);
107 scene.EventManager.OnNewClient -= NewClient;
108 }
109
110 public void PostInitialise() 90 public void PostInitialise()
111 { 91 {
112 } 92 }
@@ -120,6 +100,11 @@ namespace OpenSim.Region.CoreModules.Avatar.AvatarFactory
120 get { return "Default Avatar Factory"; } 100 get { return "Default Avatar Factory"; }
121 } 101 }
122 102
103 public bool IsSharedModule
104 {
105 get { return false; }
106 }
107
123 public void NewClient(IClientAPI client) 108 public void NewClient(IClientAPI client)
124 { 109 {
125 client.OnAvatarNowWearing += AvatarIsWearing; 110 client.OnAvatarNowWearing += AvatarIsWearing;
diff --git a/OpenSim/Region/CoreModules/Avatar/Combat/CombatModule.cs b/OpenSim/Region/CoreModules/Avatar/Combat/CombatModule.cs
index b7d12aa..61b6d65 100644
--- a/OpenSim/Region/CoreModules/Avatar/Combat/CombatModule.cs
+++ b/OpenSim/Region/CoreModules/Avatar/Combat/CombatModule.cs
@@ -27,7 +27,6 @@
27 27
28using System; 28using System;
29using System.Collections.Generic; 29using System.Collections.Generic;
30using Mono.Addins;
31using Nini.Config; 30using Nini.Config;
32using OpenSim.Region.Framework.Interfaces; 31using OpenSim.Region.Framework.Interfaces;
33using OpenSim.Region.Framework.Scenes; 32using OpenSim.Region.Framework.Scenes;
@@ -35,8 +34,7 @@ using OpenMetaverse;
35 34
36namespace OpenSim.Region.CoreModules.Avatar.Combat.CombatModule 35namespace OpenSim.Region.CoreModules.Avatar.Combat.CombatModule
37{ 36{
38 [Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule")] 37 public class CombatModule : IRegionModule
39 public class CombatModule : ISharedRegionModule
40 { 38 {
41 //private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); 39 //private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
42 40
@@ -55,17 +53,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Combat.CombatModule
55 /// </summary> 53 /// </summary>
56 /// <param name="scene"></param> 54 /// <param name="scene"></param>
57 /// <param name="config"></param> 55 /// <param name="config"></param>
58 public void Initialise(IConfigSource config) 56 public void Initialise(Scene scene, IConfigSource config)
59 {
60
61 }
62
63 public Type ReplaceableInterface
64 {
65 get { return null; }
66 }
67
68 public void AddRegion(Scene scene)
69 { 57 {
70 lock (m_scenel) 58 lock (m_scenel)
71 { 59 {
@@ -83,17 +71,6 @@ namespace OpenSim.Region.CoreModules.Avatar.Combat.CombatModule
83 scene.EventManager.OnAvatarEnteringNewParcel += AvatarEnteringParcel; 71 scene.EventManager.OnAvatarEnteringNewParcel += AvatarEnteringParcel;
84 } 72 }
85 73
86 public void RegionLoaded(Scene scene)
87 {
88 }
89
90 public void RemoveRegion(Scene scene)
91 {
92 scene.EventManager.OnAvatarKilled -= KillAvatar;
93 scene.EventManager.OnAvatarEnteringNewParcel -= AvatarEnteringParcel;
94 m_scenel.Remove(scene.RegionInfo.RegionHandle);
95 }
96
97 public void PostInitialise() 74 public void PostInitialise()
98 { 75 {
99 } 76 }
@@ -107,6 +84,11 @@ namespace OpenSim.Region.CoreModules.Avatar.Combat.CombatModule
107 get { return "CombatModule"; } 84 get { return "CombatModule"; }
108 } 85 }
109 86
87 public bool IsSharedModule
88 {
89 get { return true; }
90 }
91
110 private void KillAvatar(uint killerObjectLocalID, ScenePresence DeadAvatar) 92 private void KillAvatar(uint killerObjectLocalID, ScenePresence DeadAvatar)
111 { 93 {
112 if (killerObjectLocalID == 0) 94 if (killerObjectLocalID == 0)
diff --git a/OpenSim/Region/CoreModules/Avatar/Dialog/DialogModule.cs b/OpenSim/Region/CoreModules/Avatar/Dialog/DialogModule.cs
index ecffc7a..72ec869 100644
--- a/OpenSim/Region/CoreModules/Avatar/Dialog/DialogModule.cs
+++ b/OpenSim/Region/CoreModules/Avatar/Dialog/DialogModule.cs
@@ -25,11 +25,9 @@
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
28using System;
29using System.Collections.Generic; 28using System.Collections.Generic;
30using System.Reflection; 29using System.Reflection;
31using log4net; 30using log4net;
32using Mono.Addins;
33using Nini.Config; 31using Nini.Config;
34using OpenMetaverse; 32using OpenMetaverse;
35using OpenSim.Framework; 33using OpenSim.Framework;
@@ -39,46 +37,28 @@ using OpenSim.Region.Framework.Scenes;
39 37
40namespace OpenSim.Region.CoreModules.Avatar.Dialog 38namespace OpenSim.Region.CoreModules.Avatar.Dialog
41{ 39{
42 [Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule")] 40 public class DialogModule : IRegionModule, IDialogModule
43 public class DialogModule : ISharedRegionModule, IDialogModule
44 { 41 {
45 private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); 42 private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
46 43
47 protected Scene m_scene; 44 protected Scene m_scene;
48 45
49 public void Initialise(IConfigSource source) 46 public void Initialise(Scene scene, IConfigSource source)
50 {
51 }
52
53 public Type ReplaceableInterface
54 {
55 get { return null; }
56 }
57
58 public void AddRegion(Scene scene)
59 { 47 {
60 m_scene = scene; 48 m_scene = scene;
61 m_scene.RegisterModuleInterface<IDialogModule>(this); 49 m_scene.RegisterModuleInterface<IDialogModule>(this);
62 50
63 m_scene.AddCommand( 51 m_scene.AddCommand(
64 this, "alert", "alert <first> <last> <message>", "Send an alert to a user", HandleAlertConsoleCommand); 52 this, "alert", "alert <first> <last> <message>", "Send an alert to a user", HandleAlertConsoleCommand);
65 53
66 m_scene.AddCommand( 54 m_scene.AddCommand(
67 this, "alert general", "alert general <message>", "Send an alert to everyone", HandleAlertConsoleCommand); 55 this, "alert general", "alert general <message>", "Send an alert to everyone", HandleAlertConsoleCommand);
68 } 56 }
69 57
70 public void RegionLoaded(Scene scene) 58 public void PostInitialise() {}
71 {
72 }
73
74 public void RemoveRegion(Scene scene)
75 {
76 scene.UnregisterModuleInterface<IDialogModule>(this);
77 }
78
79 public void PostInitialise() { }
80 public void Close() {} 59 public void Close() {}
81 public string Name { get { return "Dialog Module"; } } 60 public string Name { get { return "Dialog Module"; } }
61 public bool IsSharedModule { get { return false; } }
82 62
83 public void SendAlertToUser(IClientAPI client, string message) 63 public void SendAlertToUser(IClientAPI client, string message)
84 { 64 {
diff --git a/OpenSim/Region/CoreModules/Avatar/Friends/FriendsModule.cs b/OpenSim/Region/CoreModules/Avatar/Friends/FriendsModule.cs
index 7254180..086d4fe 100644
--- a/OpenSim/Region/CoreModules/Avatar/Friends/FriendsModule.cs
+++ b/OpenSim/Region/CoreModules/Avatar/Friends/FriendsModule.cs
@@ -31,7 +31,6 @@ using System.Collections.Generic;
31using System.Net; 31using System.Net;
32using System.Reflection; 32using System.Reflection;
33using log4net; 33using log4net;
34using Mono.Addins;
35using Nini.Config; 34using Nini.Config;
36using Nwc.XmlRpc; 35using Nwc.XmlRpc;
37using OpenMetaverse; 36using OpenMetaverse;
@@ -82,8 +81,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Friends
82 - Terminate Friendship messages (single) 81 - Terminate Friendship messages (single)
83 */ 82 */
84 83
85 [Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule")] 84 public class FriendsModule : IRegionModule, IFriendsModule
86 public class FriendsModule : ISharedRegionModule, IFriendsModule
87 { 85 {
88 private class Transaction 86 private class Transaction
89 { 87 {
@@ -113,23 +111,9 @@ namespace OpenSim.Region.CoreModules.Avatar.Friends
113 111
114 private IGridService m_gridServices = null; 112 private IGridService m_gridServices = null;
115 113
116 #region ISharedRegionModule Members 114 #region IRegionModule Members
117 115
118 public void Initialise(IConfigSource config) 116 public void Initialise(Scene scene, IConfigSource config)
119 {
120
121 }
122
123 public void PostInitialise()
124 {
125 }
126
127 public Type ReplaceableInterface
128 {
129 get { return null; }
130 }
131
132 public void AddRegion(Scene scene)
133 { 117 {
134 lock (m_scenes) 118 lock (m_scenes)
135 { 119 {
@@ -144,9 +128,9 @@ namespace OpenSim.Region.CoreModules.Avatar.Friends
144 if (!m_scenes.ContainsKey(scene.RegionInfo.RegionHandle)) 128 if (!m_scenes.ContainsKey(scene.RegionInfo.RegionHandle))
145 m_scenes[scene.RegionInfo.RegionHandle] = scene; 129 m_scenes[scene.RegionInfo.RegionHandle] = scene;
146 } 130 }
147 131
148 scene.RegisterModuleInterface<IFriendsModule>(this); 132 scene.RegisterModuleInterface<IFriendsModule>(this);
149 133
150 scene.EventManager.OnNewClient += OnNewClient; 134 scene.EventManager.OnNewClient += OnNewClient;
151 scene.EventManager.OnIncomingInstantMessage += OnGridInstantMessage; 135 scene.EventManager.OnIncomingInstantMessage += OnGridInstantMessage;
152 scene.EventManager.OnAvatarEnteringNewParcel += AvatarEnteringParcel; 136 scene.EventManager.OnAvatarEnteringNewParcel += AvatarEnteringParcel;
@@ -154,34 +138,17 @@ namespace OpenSim.Region.CoreModules.Avatar.Friends
154 scene.EventManager.OnClientClosed += ClientClosed; 138 scene.EventManager.OnClientClosed += ClientClosed;
155 } 139 }
156 140
157 public void RegionLoaded(Scene scene) 141 public void PostInitialise()
158 { 142 {
159 if (m_scenes.Count > 0) 143 if (m_scenes.Count > 0)
160 { 144 {
161 m_TransferModule = scene.RequestModuleInterface<IMessageTransferModule>(); 145 m_TransferModule = m_initialScene.RequestModuleInterface<IMessageTransferModule>();
162 m_gridServices = scene.GridService; 146 m_gridServices = m_initialScene.GridService;
163 } 147 }
164 if (m_TransferModule == null) 148 if (m_TransferModule == null)
165 m_log.Error("[FRIENDS]: Unable to find a message transfer module, friendship offers will not work"); 149 m_log.Error("[FRIENDS]: Unable to find a message transfer module, friendship offers will not work");
166 } 150 }
167 151
168 public void RemoveRegion(Scene scene)
169 {
170 MainServer.Instance.RemoveXmlRPCHandler("presence_update_bulk");
171 MainServer.Instance.RemoveXmlRPCHandler("terminate_friend");
172
173 if (m_scenes.ContainsKey(scene.RegionInfo.RegionHandle))
174 m_scenes.Remove(scene.RegionInfo.RegionHandle);
175
176 scene.UnregisterModuleInterface<IFriendsModule>(this);
177
178 scene.EventManager.OnNewClient -= OnNewClient;
179 scene.EventManager.OnIncomingInstantMessage -= OnGridInstantMessage;
180 scene.EventManager.OnAvatarEnteringNewParcel -= AvatarEnteringParcel;
181 scene.EventManager.OnMakeChildAgent -= MakeChildAgent;
182 scene.EventManager.OnClientClosed -= ClientClosed;
183 }
184
185 public void Close() 152 public void Close()
186 { 153 {
187 } 154 }
@@ -191,6 +158,11 @@ namespace OpenSim.Region.CoreModules.Avatar.Friends
191 get { return "FriendsModule"; } 158 get { return "FriendsModule"; }
192 } 159 }
193 160
161 public bool IsSharedModule
162 {
163 get { return true; }
164 }
165
194 #endregion 166 #endregion
195 167
196 #region IInterregionFriendsComms 168 #region IInterregionFriendsComms
diff --git a/OpenSim/Region/CoreModules/Avatar/Gestures/GesturesModule.cs b/OpenSim/Region/CoreModules/Avatar/Gestures/GesturesModule.cs
index c306f94..8ce5092 100644
--- a/OpenSim/Region/CoreModules/Avatar/Gestures/GesturesModule.cs
+++ b/OpenSim/Region/CoreModules/Avatar/Gestures/GesturesModule.cs
@@ -25,10 +25,8 @@
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
28using System;
29using System.Reflection; 28using System.Reflection;
30using log4net; 29using log4net;
31using Mono.Addins;
32using Nini.Config; 30using Nini.Config;
33using OpenMetaverse; 31using OpenMetaverse;
34using OpenSim.Framework; 32using OpenSim.Framework;
@@ -39,41 +37,23 @@ using OpenSim.Services.Interfaces;
39 37
40namespace OpenSim.Region.CoreModules.Avatar.Gestures 38namespace OpenSim.Region.CoreModules.Avatar.Gestures
41{ 39{
42 [Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule")] 40 public class GesturesModule : IRegionModule
43 public class GesturesModule : INonSharedRegionModule
44 { 41 {
45 private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); 42 private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
46 43
47 protected Scene m_scene; 44 protected Scene m_scene;
48 45
49 public void Initialise(IConfigSource source) 46 public void Initialise(Scene scene, IConfigSource source)
50 {
51 }
52
53 public Type ReplaceableInterface
54 {
55 get { return null; }
56 }
57
58 public void AddRegion(Scene scene)
59 { 47 {
60 m_scene = scene; 48 m_scene = scene;
49
61 m_scene.EventManager.OnNewClient += OnNewClient; 50 m_scene.EventManager.OnNewClient += OnNewClient;
62 } 51 }
63
64 public void RegionLoaded(Scene scene)
65 {
66 }
67
68 public void RemoveRegion(Scene scene)
69 {
70 if(m_scene == scene)
71 m_scene = null;
72 scene.EventManager.OnNewClient -= OnNewClient;
73 }
74 52
53 public void PostInitialise() {}
75 public void Close() {} 54 public void Close() {}
76 public string Name { get { return "Gestures Module"; } } 55 public string Name { get { return "Gestures Module"; } }
56 public bool IsSharedModule { get { return false; } }
77 57
78 private void OnNewClient(IClientAPI client) 58 private void OnNewClient(IClientAPI client)
79 { 59 {
diff --git a/OpenSim/Region/CoreModules/Avatar/Gods/GodsModule.cs b/OpenSim/Region/CoreModules/Avatar/Gods/GodsModule.cs
index 3914f2e..50171a3 100644
--- a/OpenSim/Region/CoreModules/Avatar/Gods/GodsModule.cs
+++ b/OpenSim/Region/CoreModules/Avatar/Gods/GodsModule.cs
@@ -25,9 +25,7 @@
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
28using System;
29using System.Collections.Generic; 28using System.Collections.Generic;
30using Mono.Addins;
31using Nini.Config; 29using Nini.Config;
32using OpenMetaverse; 30using OpenMetaverse;
33using OpenSim.Framework; 31using OpenSim.Framework;
@@ -36,8 +34,7 @@ using OpenSim.Region.Framework.Interfaces;
36 34
37namespace OpenSim.Region.CoreModules.Avatar.Gods 35namespace OpenSim.Region.CoreModules.Avatar.Gods
38{ 36{
39 [Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule")] 37 public class GodsModule : IRegionModule, IGodsModule
40 public class GodsModule : INonSharedRegionModule, IGodsModule
41 { 38 {
42 /// <summary>Special UUID for actions that apply to all agents</summary> 39 /// <summary>Special UUID for actions that apply to all agents</summary>
43 private static readonly UUID ALL_AGENTS = new UUID("44e87126-e794-4ded-05b3-7c42da3d5cdb"); 40 private static readonly UUID ALL_AGENTS = new UUID("44e87126-e794-4ded-05b3-7c42da3d5cdb");
@@ -45,34 +42,17 @@ namespace OpenSim.Region.CoreModules.Avatar.Gods
45 protected Scene m_scene; 42 protected Scene m_scene;
46 protected IDialogModule m_dialogModule; 43 protected IDialogModule m_dialogModule;
47 44
48 public void Initialise(IConfigSource source) 45 public void Initialise(Scene scene, IConfigSource source)
49 {
50
51 }
52
53 public Type ReplaceableInterface
54 {
55 get { return null; }
56 }
57
58 public void AddRegion(Scene scene)
59 { 46 {
60 m_scene = scene; 47 m_scene = scene;
61 m_dialogModule = m_scene.RequestModuleInterface<IDialogModule>(); 48 m_dialogModule = m_scene.RequestModuleInterface<IDialogModule>();
62 m_scene.RegisterModuleInterface<IGodsModule>(this); 49 m_scene.RegisterModuleInterface<IGodsModule>(this);
63 } 50 }
64
65 public void RegionLoaded(Scene scene)
66 {
67 }
68
69 public void RemoveRegion(Scene scene)
70 {
71 scene.UnregisterModuleInterface<IGodsModule>(this);
72 }
73 51
52 public void PostInitialise() {}
74 public void Close() {} 53 public void Close() {}
75 public string Name { get { return "Gods Module"; } } 54 public string Name { get { return "Gods Module"; } }
55 public bool IsSharedModule { get { return false; } }
76 56
77 public void RequestGodlikePowers( 57 public void RequestGodlikePowers(
78 UUID agentID, UUID sessionID, UUID token, bool godLike, IClientAPI controllingClient) 58 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 7ff8d30..31363e5 100644
--- a/OpenSim/Region/CoreModules/Avatar/Groups/GroupsModule.cs
+++ b/OpenSim/Region/CoreModules/Avatar/Groups/GroupsModule.cs
@@ -25,11 +25,9 @@
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
28using System;
29using System.Collections.Generic; 28using System.Collections.Generic;
30using System.Reflection; 29using System.Reflection;
31using log4net; 30using log4net;
32using Mono.Addins;
33using Nini.Config; 31using Nini.Config;
34using OpenMetaverse; 32using OpenMetaverse;
35using OpenSim.Framework; 33using OpenSim.Framework;
@@ -38,8 +36,7 @@ using OpenSim.Region.Framework.Scenes;
38 36
39namespace OpenSim.Region.CoreModules.Avatar.Groups 37namespace OpenSim.Region.CoreModules.Avatar.Groups
40{ 38{
41 [Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule")] 39 public class GroupsModule : IRegionModule
42 public class GroupsModule : ISharedRegionModule
43 { 40 {
44 private static readonly ILog m_log = 41 private static readonly ILog m_log =
45 LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); 42 LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
@@ -58,9 +55,9 @@ namespace OpenSim.Region.CoreModules.Avatar.Groups
58 private static GroupMembershipData osGroup = 55 private static GroupMembershipData osGroup =
59 new GroupMembershipData(); 56 new GroupMembershipData();
60 57
61 #region ISharedRegionModule Members 58 #region IRegionModule Members
62 59
63 public void Initialise(IConfigSource config) 60 public void Initialise(Scene scene, IConfigSource config)
64 { 61 {
65 IConfig groupsConfig = config.Configs["Groups"]; 62 IConfig groupsConfig = config.Configs["Groups"];
66 63
@@ -79,15 +76,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Groups
79 if (groupsConfig.GetString("Module", "Default") != "Default") 76 if (groupsConfig.GetString("Module", "Default") != "Default")
80 return; 77 return;
81 } 78 }
82 }
83
84 public Type ReplaceableInterface
85 {
86 get { return null; }
87 }
88 79
89 public void AddRegion(Scene scene)
90 {
91 lock (m_SceneList) 80 lock (m_SceneList)
92 { 81 {
93 if (!m_SceneList.Contains(scene)) 82 if (!m_SceneList.Contains(scene))
@@ -110,19 +99,6 @@ namespace OpenSim.Region.CoreModules.Avatar.Groups
110 scene.EventManager.OnIncomingInstantMessage += OnGridInstantMessage; 99 scene.EventManager.OnIncomingInstantMessage += OnGridInstantMessage;
111 } 100 }
112 101
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
126 public void PostInitialise() 102 public void PostInitialise()
127 { 103 {
128 } 104 }
@@ -147,6 +123,11 @@ namespace OpenSim.Region.CoreModules.Avatar.Groups
147 get { return "GroupsModule"; } 123 get { return "GroupsModule"; }
148 } 124 }
149 125
126 public bool IsSharedModule
127 {
128 get { return true; }
129 }
130
150 #endregion 131 #endregion
151 132
152 private void OnNewClient(IClientAPI client) 133 private void OnNewClient(IClientAPI client)
diff --git a/OpenSim/Region/CoreModules/Avatar/InstantMessage/InstantMessageModule.cs b/OpenSim/Region/CoreModules/Avatar/InstantMessage/InstantMessageModule.cs
index e1bde4b..9a68749 100644
--- a/OpenSim/Region/CoreModules/Avatar/InstantMessage/InstantMessageModule.cs
+++ b/OpenSim/Region/CoreModules/Avatar/InstantMessage/InstantMessageModule.cs
@@ -24,12 +24,9 @@
24 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 24 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
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
28using System;
29using System.Collections.Generic; 27using System.Collections.Generic;
30using System.Reflection; 28using System.Reflection;
31using log4net; 29using log4net;
32using Mono.Addins;
33using Nini.Config; 30using Nini.Config;
34using OpenMetaverse; 31using OpenMetaverse;
35using OpenSim.Framework; 32using OpenSim.Framework;
@@ -39,8 +36,7 @@ using OpenSim.Region.Framework.Scenes;
39 36
40namespace OpenSim.Region.CoreModules.Avatar.InstantMessage 37namespace OpenSim.Region.CoreModules.Avatar.InstantMessage
41{ 38{
42 [Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule")] 39 public class InstantMessageModule : IRegionModule
43 public class InstantMessageModule : ISharedRegionModule
44 { 40 {
45 private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); 41 private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
46 42
@@ -51,11 +47,11 @@ namespace OpenSim.Region.CoreModules.Avatar.InstantMessage
51 47
52 private readonly List<Scene> m_scenes = new List<Scene>(); 48 private readonly List<Scene> m_scenes = new List<Scene>();
53 49
54 #region ISharedRegionModule Members 50 #region IRegionModule Members
55 51
56 private IMessageTransferModule m_TransferModule = null; 52 private IMessageTransferModule m_TransferModule = null;
57 53
58 public void Initialise(IConfigSource config) 54 public void Initialise(Scene scene, IConfigSource config)
59 { 55 {
60 if (config.Configs["Messaging"] != null) 56 if (config.Configs["Messaging"] != null)
61 { 57 {
@@ -66,15 +62,7 @@ namespace OpenSim.Region.CoreModules.Avatar.InstantMessage
66 } 62 }
67 63
68 m_enabled = true; 64 m_enabled = true;
69 }
70
71 public Type ReplaceableInterface
72 {
73 get { return null; }
74 }
75 65
76 public void AddRegion(Scene scene)
77 {
78 lock (m_scenes) 66 lock (m_scenes)
79 { 67 {
80 if (!m_scenes.Contains(scene)) 68 if (!m_scenes.Contains(scene))
@@ -86,27 +74,6 @@ namespace OpenSim.Region.CoreModules.Avatar.InstantMessage
86 } 74 }
87 } 75 }
88 76
89 public void RegionLoaded(Scene scene)
90 {
91 if (!m_enabled)
92 return;
93
94 m_TransferModule =
95 m_scenes[0].RequestModuleInterface<IMessageTransferModule>();
96
97 if (m_TransferModule == null)
98 m_log.Error("[INSTANT MESSAGE]: No message transfer module, " +
99 "IM will not work!");
100 }
101
102 public void RemoveRegion(Scene scene)
103 {
104 if (m_scenes.Contains(scene))
105 m_scenes.Remove(scene);
106 scene.EventManager.OnClientConnect -= OnClientConnect;
107 scene.EventManager.OnIncomingInstantMessage -= OnGridInstantMessage;
108 }
109
110 void OnClientConnect(IClientCore client) 77 void OnClientConnect(IClientCore client)
111 { 78 {
112 IClientIM clientIM; 79 IClientIM clientIM;
@@ -118,6 +85,15 @@ namespace OpenSim.Region.CoreModules.Avatar.InstantMessage
118 85
119 public void PostInitialise() 86 public void PostInitialise()
120 { 87 {
88 if (!m_enabled)
89 return;
90
91 m_TransferModule =
92 m_scenes[0].RequestModuleInterface<IMessageTransferModule>();
93
94 if (m_TransferModule == null)
95 m_log.Error("[INSTANT MESSAGE]: No message transfer module, "+
96 "IM will not work!");
121 } 97 }
122 98
123 public void Close() 99 public void Close()
@@ -129,6 +105,11 @@ namespace OpenSim.Region.CoreModules.Avatar.InstantMessage
129 get { return "InstantMessageModule"; } 105 get { return "InstantMessageModule"; }
130 } 106 }
131 107
108 public bool IsSharedModule
109 {
110 get { return true; }
111 }
112
132 #endregion 113 #endregion
133 114
134 public void OnInstantMessage(IClientAPI client, GridInstantMessage im) 115 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 16bdfdd..e5159b3 100644
--- a/OpenSim/Region/CoreModules/Avatar/InstantMessage/MessageTransferModule.cs
+++ b/OpenSim/Region/CoreModules/Avatar/InstantMessage/MessageTransferModule.cs
@@ -30,7 +30,6 @@ using System.Collections.Generic;
30using System.Net; 30using System.Net;
31using System.Reflection; 31using System.Reflection;
32using log4net; 32using log4net;
33using Mono.Addins;
34using Nini.Config; 33using Nini.Config;
35using Nwc.XmlRpc; 34using Nwc.XmlRpc;
36using OpenMetaverse; 35using OpenMetaverse;
@@ -41,8 +40,7 @@ using GridRegion = OpenSim.Services.Interfaces.GridRegion;
41 40
42namespace OpenSim.Region.CoreModules.Avatar.InstantMessage 41namespace OpenSim.Region.CoreModules.Avatar.InstantMessage
43{ 42{
44 [Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule")] 43 public class MessageTransferModule : IRegionModule, IMessageTransferModule
45 public class MessageTransferModule : ISharedRegionModule, IMessageTransferModule
46 { 44 {
47 private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); 45 private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
48 46
@@ -52,9 +50,8 @@ namespace OpenSim.Region.CoreModules.Avatar.InstantMessage
52 protected Dictionary<UUID, ulong> m_UserRegionMap = new Dictionary<UUID, ulong>(); 50 protected Dictionary<UUID, ulong> m_UserRegionMap = new Dictionary<UUID, ulong>();
53 51
54 public event UndeliveredMessage OnUndeliveredMessage; 52 public event UndeliveredMessage OnUndeliveredMessage;
55 private bool m_enabled = true;
56 53
57 public virtual void Initialise(IConfigSource config) 54 public virtual void Initialise(Scene scene, IConfigSource config)
58 { 55 {
59 IConfig cnf = config.Configs["Messaging"]; 56 IConfig cnf = config.Configs["Messaging"];
60 if (cnf != null && cnf.GetString( 57 if (cnf != null && cnf.GetString(
@@ -62,49 +59,27 @@ namespace OpenSim.Region.CoreModules.Avatar.InstantMessage
62 "MessageTransferModule") 59 "MessageTransferModule")
63 { 60 {
64 m_log.Debug("[MESSAGE TRANSFER]: Disabled by configuration"); 61 m_log.Debug("[MESSAGE TRANSFER]: Disabled by configuration");
65 m_enabled = false; 62 return;
66 } 63 }
67 64
68 cnf = config.Configs["Startup"]; 65 cnf = config.Configs["Startup"];
69 if (cnf != null) 66 if (cnf != null)
70 m_Gridmode = cnf.GetBoolean("gridmode", false); 67 m_Gridmode = cnf.GetBoolean("gridmode", false);
71 }
72 68
73 public Type ReplaceableInterface 69 // m_Enabled = true;
74 {
75 get { return null; }
76 }
77 70
78 public void AddRegion(Scene scene) 71 lock (m_Scenes)
79 {
80 if (m_enabled)
81 { 72 {
82 lock (m_Scenes) 73 if (m_Scenes.Count == 0)
83 { 74 {
84 if (m_Scenes.Count == 0) 75 MainServer.Instance.AddXmlRPCHandler(
85 { 76 "grid_instant_message", processXMLRPCGridInstantMessage);
86 MainServer.Instance.AddXmlRPCHandler(
87 "grid_instant_message", processXMLRPCGridInstantMessage);
88 }
89
90 m_log.Debug("[MESSAGE TRANSFER]: Message transfer module active");
91 scene.RegisterModuleInterface<IMessageTransferModule>(this);
92 m_Scenes.Add(scene);
93 } 77 }
94 }
95 }
96 78
97 public void RegionLoaded(Scene scene) 79 m_log.Debug("[MESSAGE TRANSFER]: Message transfer module active");
98 { 80 scene.RegisterModuleInterface<IMessageTransferModule>(this);
99 } 81 m_Scenes.Add(scene);
100 82 }
101 public void RemoveRegion(Scene scene)
102 {
103 if (m_Scenes.Contains(scene))
104 m_Scenes.Remove(scene);
105 MainServer.Instance.RemoveXmlRPCHandler(
106 "grid_instant_message");
107 scene.UnregisterModuleInterface<IMessageTransferModule>(this);
108 } 83 }
109 84
110 public virtual void PostInitialise() 85 public virtual void PostInitialise()
@@ -120,6 +95,11 @@ namespace OpenSim.Region.CoreModules.Avatar.InstantMessage
120 get { return "MessageTransferModule"; } 95 get { return "MessageTransferModule"; }
121 } 96 }
122 97
98 public virtual bool IsSharedModule
99 {
100 get { return true; }
101 }
102
123 public virtual void SendInstantMessage(GridInstantMessage im, MessageResultNotification result) 103 public virtual void SendInstantMessage(GridInstantMessage im, MessageResultNotification result)
124 { 104 {
125 UUID toAgentID = new UUID(im.toAgentID); 105 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 3570495..2d4a635 100644
--- a/OpenSim/Region/CoreModules/Avatar/InstantMessage/MuteListModule.cs
+++ b/OpenSim/Region/CoreModules/Avatar/InstantMessage/MuteListModule.cs
@@ -28,7 +28,6 @@ using System;
28using System.Collections.Generic; 28using System.Collections.Generic;
29using System.Reflection; 29using System.Reflection;
30using log4net; 30using log4net;
31using Mono.Addins;
32using Nini.Config; 31using Nini.Config;
33using OpenMetaverse; 32using OpenMetaverse;
34using OpenSim.Framework; 33using OpenSim.Framework;
@@ -40,8 +39,7 @@ using OpenSim.Region.Framework.Scenes;
40 39
41namespace OpenSim.Region.CoreModules.Avatar.MuteList 40namespace OpenSim.Region.CoreModules.Avatar.MuteList
42{ 41{
43 [Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule")] 42 public class MuteListModule : IRegionModule
44 public class MuteListModule : ISharedRegionModule
45 { 43 {
46 private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); 44 private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
47 45
@@ -49,7 +47,7 @@ namespace OpenSim.Region.CoreModules.Avatar.MuteList
49 private List<Scene> m_SceneList = new List<Scene>(); 47 private List<Scene> m_SceneList = new List<Scene>();
50 private string m_RestURL = String.Empty; 48 private string m_RestURL = String.Empty;
51 49
52 public void Initialise(IConfigSource config) 50 public void Initialise(Scene scene, IConfigSource config)
53 { 51 {
54 if (!enabled) 52 if (!enabled)
55 return; 53 return;
@@ -68,24 +66,19 @@ namespace OpenSim.Region.CoreModules.Avatar.MuteList
68 enabled = false; 66 enabled = false;
69 return; 67 return;
70 } 68 }
71 m_RestURL = cnf.GetString("MuteListURL", "");
72 if (m_RestURL == "")
73 {
74 m_log.Error("[MUTE LIST] Module was enabled, but no URL is given, disabling");
75 enabled = false;
76 return;
77 }
78 }
79 69
80 public Type ReplaceableInterface
81 {
82 get { return null; }
83 }
84
85 public void AddRegion(Scene scene)
86 {
87 lock (m_SceneList) 70 lock (m_SceneList)
88 { 71 {
72 if (m_SceneList.Count == 0)
73 {
74 m_RestURL = cnf.GetString("MuteListURL", "");
75 if (m_RestURL == "")
76 {
77 m_log.Error("[MUTE LIST] Module was enabled, but no URL is given, disabling");
78 enabled = false;
79 return;
80 }
81 }
89 if (!m_SceneList.Contains(scene)) 82 if (!m_SceneList.Contains(scene))
90 m_SceneList.Add(scene); 83 m_SceneList.Add(scene);
91 84
@@ -93,18 +86,6 @@ namespace OpenSim.Region.CoreModules.Avatar.MuteList
93 } 86 }
94 } 87 }
95 88
96 public void RegionLoaded(Scene scene)
97 {
98 }
99
100 public void RemoveRegion(Scene scene)
101 {
102 if (m_SceneList.Contains(scene))
103 m_SceneList.Remove(scene);
104
105 scene.EventManager.OnNewClient -= OnNewClient;
106 }
107
108 public void PostInitialise() 89 public void PostInitialise()
109 { 90 {
110 if (!enabled) 91 if (!enabled)
@@ -121,6 +102,11 @@ namespace OpenSim.Region.CoreModules.Avatar.MuteList
121 get { return "MuteListModule"; } 102 get { return "MuteListModule"; }
122 } 103 }
123 104
105 public bool IsSharedModule
106 {
107 get { return true; }
108 }
109
124 public void Close() 110 public void Close()
125 { 111 {
126 } 112 }
diff --git a/OpenSim/Region/CoreModules/Avatar/InstantMessage/OfflineMessageModule.cs b/OpenSim/Region/CoreModules/Avatar/InstantMessage/OfflineMessageModule.cs
index 6c4d0bf..ff38b6f 100644
--- a/OpenSim/Region/CoreModules/Avatar/InstantMessage/OfflineMessageModule.cs
+++ b/OpenSim/Region/CoreModules/Avatar/InstantMessage/OfflineMessageModule.cs
@@ -28,7 +28,6 @@ using System;
28using System.Collections.Generic; 28using System.Collections.Generic;
29using System.Reflection; 29using System.Reflection;
30using log4net; 30using log4net;
31using Mono.Addins;
32using Nini.Config; 31using Nini.Config;
33using OpenMetaverse; 32using OpenMetaverse;
34using OpenSim.Framework; 33using OpenSim.Framework;
@@ -41,8 +40,7 @@ using OpenSim.Region.Framework.Scenes;
41 40
42namespace OpenSim.Region.CoreModules.Avatar.InstantMessage 41namespace OpenSim.Region.CoreModules.Avatar.InstantMessage
43{ 42{
44 [Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule")] 43 public class OfflineMessageModule : IRegionModule
45 public class OfflineMessageModule : ISharedRegionModule
46 { 44 {
47 private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); 45 private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
48 46
@@ -51,7 +49,7 @@ namespace OpenSim.Region.CoreModules.Avatar.InstantMessage
51 private string m_RestURL = String.Empty; 49 private string m_RestURL = String.Empty;
52 private bool m_ForwardOfflineGroupMessages = true; 50 private bool m_ForwardOfflineGroupMessages = true;
53 51
54 public void Initialise(IConfigSource config) 52 public void Initialise(Scene scene, IConfigSource config)
55 { 53 {
56 if (!enabled) 54 if (!enabled)
57 return; 55 return;
@@ -85,23 +83,14 @@ namespace OpenSim.Region.CoreModules.Avatar.InstantMessage
85 return; 83 return;
86 } 84 }
87 } 85 }
88 } 86 if (!m_SceneList.Contains(scene))
89 } 87 m_SceneList.Add(scene);
90
91 public Type ReplaceableInterface
92 {
93 get { return null; }
94 }
95 88
96 public void AddRegion(Scene scene) 89 scene.EventManager.OnNewClient += OnNewClient;
97 { 90 }
98 if (!m_SceneList.Contains(scene))
99 m_SceneList.Add(scene);
100
101 scene.EventManager.OnNewClient += OnNewClient;
102 } 91 }
103 92
104 public void RegionLoaded(Scene scene) 93 public void PostInitialise()
105 { 94 {
106 if (!enabled) 95 if (!enabled)
107 return; 96 return;
@@ -131,22 +120,16 @@ namespace OpenSim.Region.CoreModules.Avatar.InstantMessage
131 m_log.Debug("[OFFLINE MESSAGING] Offline messages enabled"); 120 m_log.Debug("[OFFLINE MESSAGING] Offline messages enabled");
132 } 121 }
133 122
134 public void RemoveRegion(Scene scene)
135 {
136 if (m_SceneList.Contains(scene))
137 m_SceneList.Remove(scene);
138 scene.EventManager.OnNewClient -= OnNewClient;
139 }
140
141 public void PostInitialise()
142 {
143 }
144
145 public string Name 123 public string Name
146 { 124 {
147 get { return "OfflineMessageModule"; } 125 get { return "OfflineMessageModule"; }
148 } 126 }
149 127
128 public bool IsSharedModule
129 {
130 get { return true; }
131 }
132
150 public void Close() 133 public void Close()
151 { 134 {
152 } 135 }
diff --git a/OpenSim/Region/CoreModules/Avatar/InstantMessage/PresenceModule.cs b/OpenSim/Region/CoreModules/Avatar/InstantMessage/PresenceModule.cs
index f5498f4..f5ab454 100644
--- a/OpenSim/Region/CoreModules/Avatar/InstantMessage/PresenceModule.cs
+++ b/OpenSim/Region/CoreModules/Avatar/InstantMessage/PresenceModule.cs
@@ -24,14 +24,11 @@
24 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 24 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
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
28using System;
29using System.Collections; 27using System.Collections;
30using System.Collections.Generic; 28using System.Collections.Generic;
31using System.Net; 29using System.Net;
32using System.Reflection; 30using System.Reflection;
33using log4net; 31using log4net;
34using Mono.Addins;
35using Nini.Config; 32using Nini.Config;
36using Nwc.XmlRpc; 33using Nwc.XmlRpc;
37using OpenMetaverse; 34using OpenMetaverse;
@@ -42,8 +39,7 @@ using GridRegion = OpenSim.Services.Interfaces.GridRegion;
42 39
43namespace OpenSim.Region.CoreModules.Avatar.InstantMessage 40namespace OpenSim.Region.CoreModules.Avatar.InstantMessage
44{ 41{
45 [Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule")] 42 public class PresenceModule : IRegionModule, IPresenceModule
46 public class PresenceModule : ISharedRegionModule, IPresenceModule
47 { 43 {
48 private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); 44 private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
49 45
@@ -63,7 +59,7 @@ namespace OpenSim.Region.CoreModules.Avatar.InstantMessage
63 public event PresenceChange OnPresenceChange; 59 public event PresenceChange OnPresenceChange;
64 public event BulkPresenceData OnBulkPresenceData; 60 public event BulkPresenceData OnBulkPresenceData;
65 61
66 public void Initialise(IConfigSource config) 62 public void Initialise(Scene scene, IConfigSource config)
67 { 63 {
68 lock (m_Scenes) 64 lock (m_Scenes)
69 { 65 {
@@ -82,38 +78,28 @@ namespace OpenSim.Region.CoreModules.Avatar.InstantMessage
82 m_Gridmode = cnf.GetBoolean("gridmode", false); 78 m_Gridmode = cnf.GetBoolean("gridmode", false);
83 79
84 m_Enabled = true; 80 m_Enabled = true;
85 }
86 }
87 }
88 81
89 public Type ReplaceableInterface 82 m_initialScene = scene;
90 { 83 }
91 get { return null; }
92 }
93 84
94 public void AddRegion(Scene scene)
95 {
96 if (m_Enabled)
97 {
98 m_initialScene = scene;
99 if (m_Gridmode) 85 if (m_Gridmode)
100 NotifyMessageServerOfStartup(scene); 86 NotifyMessageServerOfStartup(scene);
101 87
102 m_Scenes.Add(scene); 88 m_Scenes.Add(scene);
89 }
103 90
104 scene.RegisterModuleInterface<IPresenceModule>(this); 91 scene.RegisterModuleInterface<IPresenceModule>(this);
105 92
106 scene.EventManager.OnNewClient += OnNewClient; 93 scene.EventManager.OnNewClient += OnNewClient;
107 scene.EventManager.OnSetRootAgentScene += OnSetRootAgentScene; 94 scene.EventManager.OnSetRootAgentScene += OnSetRootAgentScene;
108 scene.EventManager.OnMakeChildAgent += OnMakeChildAgent; 95 scene.EventManager.OnMakeChildAgent += OnMakeChildAgent;
109 }
110 } 96 }
111 97
112 public void RegionLoaded(Scene scene) 98 public void PostInitialise()
113 { 99 {
114 } 100 }
115 101
116 public void RemoveRegion(Scene scene) 102 public void Close()
117 { 103 {
118 if (!m_Gridmode || !m_Enabled) 104 if (!m_Gridmode || !m_Enabled)
119 return; 105 return;
@@ -130,28 +116,21 @@ namespace OpenSim.Region.CoreModules.Avatar.InstantMessage
130 } 116 }
131 } 117 }
132 118
133 NotifyMessageServerOfShutdown(scene); 119 lock (m_Scenes)
134 if(m_Scenes.Contains(scene)) 120 {
135 m_Scenes.Remove(scene); 121 foreach (Scene scene in m_Scenes)
136 122 NotifyMessageServerOfShutdown(scene);
137 scene.UnregisterModuleInterface<IPresenceModule>(this); 123 }
138
139 scene.EventManager.OnNewClient -= OnNewClient;
140 scene.EventManager.OnSetRootAgentScene -= OnSetRootAgentScene;
141 scene.EventManager.OnMakeChildAgent -= OnMakeChildAgent;
142 }
143
144 public void PostInitialise()
145 {
146 } 124 }
147 125
148 public void Close() 126 public string Name
149 { 127 {
128 get { return "PresenceModule"; }
150 } 129 }
151 130
152 public string Name 131 public bool IsSharedModule
153 { 132 {
154 get { return "PresenceModule"; } 133 get { return true; }
155 } 134 }
156 135
157 public void RequestBulkPresenceData(UUID[] users) 136 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 a04ab22..ecd60bd 100644
--- a/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/InventoryArchiverModule.cs
+++ b/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/InventoryArchiverModule.cs
@@ -30,7 +30,6 @@ using System.Collections.Generic;
30using System.IO; 30using System.IO;
31using System.Reflection; 31using System.Reflection;
32using log4net; 32using log4net;
33using Mono.Addins;
34using Nini.Config; 33using Nini.Config;
35using OpenMetaverse; 34using OpenMetaverse;
36using OpenSim.Framework; 35using OpenSim.Framework;
@@ -42,11 +41,10 @@ using OpenSim.Services.Interfaces;
42 41
43namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver 42namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver
44{ 43{
45 [Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule")]
46 /// <summary> 44 /// <summary>
47 /// This module loads and saves OpenSimulator inventory archives 45 /// This module loads and saves OpenSimulator inventory archives
48 /// </summary> 46 /// </summary>
49 public class InventoryArchiverModule : ISharedRegionModule, IInventoryArchiverModule 47 public class InventoryArchiverModule : IRegionModule, IInventoryArchiverModule
50 { 48 {
51 private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); 49 private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
52 50
@@ -84,28 +82,18 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver
84 DisablePresenceChecks = disablePresenceChecks; 82 DisablePresenceChecks = disablePresenceChecks;
85 } 83 }
86 84
87 public void Initialise(IConfigSource source) 85 public void Initialise(Scene scene, IConfigSource source)
88 {
89
90 }
91
92 public Type ReplaceableInterface
93 {
94 get { return null; }
95 }
96
97 public void AddRegion(Scene scene)
98 { 86 {
99 if (m_scenes.Count == 0) 87 if (m_scenes.Count == 0)
100 { 88 {
101 scene.RegisterModuleInterface<IInventoryArchiverModule>(this); 89 scene.RegisterModuleInterface<IInventoryArchiverModule>(this);
102 OnInventoryArchiveSaved += SaveInvConsoleCommandCompleted; 90 OnInventoryArchiveSaved += SaveInvConsoleCommandCompleted;
103 91
104 scene.AddCommand( 92 scene.AddCommand(
105 this, "load iar", 93 this, "load iar",
106 "load iar <first> <last> <inventory path> <password> [<archive path>]", 94 "load iar <first> <last> <inventory path> <password> [<archive path>]",
107 "Load user inventory archive.", HandleLoadInvConsoleCommand); 95 "Load user inventory archive.", HandleLoadInvConsoleCommand);
108 96
109 scene.AddCommand( 97 scene.AddCommand(
110 this, "save iar", 98 this, "save iar",
111 "save iar <first> <last> <inventory path> <password> [<archive path>]", 99 "save iar <first> <last> <inventory path> <password> [<archive path>]",
@@ -113,21 +101,10 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver
113 101
114 m_aScene = scene; 102 m_aScene = scene;
115 } 103 }
116 104
117 m_scenes[scene.RegionInfo.RegionID] = scene; 105 m_scenes[scene.RegionInfo.RegionID] = scene;
118 } 106 }
119 107
120 public void RegionLoaded(Scene scene)
121 {
122 }
123
124 public void RemoveRegion(Scene scene)
125 {
126 scene.UnregisterModuleInterface<IInventoryArchiverModule>(this);
127 if(m_scenes.ContainsKey(scene.RegionInfo.RegionID))
128 m_scenes.Remove(scene.RegionInfo.RegionID);
129 }
130
131 public void PostInitialise() {} 108 public void PostInitialise() {}
132 109
133 public void Close() {} 110 public void Close() {}
diff --git a/OpenSim/Region/CoreModules/Avatar/Inventory/Transfer/InventoryTransferModule.cs b/OpenSim/Region/CoreModules/Avatar/Inventory/Transfer/InventoryTransferModule.cs
index 44906b4..d9a021f 100644
--- a/OpenSim/Region/CoreModules/Avatar/Inventory/Transfer/InventoryTransferModule.cs
+++ b/OpenSim/Region/CoreModules/Avatar/Inventory/Transfer/InventoryTransferModule.cs
@@ -29,7 +29,6 @@ using System;
29using System.Collections.Generic; 29using System.Collections.Generic;
30using System.Reflection; 30using System.Reflection;
31using log4net; 31using log4net;
32using Mono.Addins;
33using Nini.Config; 32using Nini.Config;
34using OpenMetaverse; 33using OpenMetaverse;
35using OpenSim.Framework; 34using OpenSim.Framework;
@@ -40,8 +39,7 @@ using OpenSim.Services.Interfaces;
40 39
41namespace OpenSim.Region.CoreModules.Avatar.Inventory.Transfer 40namespace OpenSim.Region.CoreModules.Avatar.Inventory.Transfer
42{ 41{
43 [Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule")] 42 public class InventoryTransferModule : IInventoryTransferModule, IRegionModule
44 public class InventoryTransferModule : IInventoryTransferModule, ISharedRegionModule
45 { 43 {
46 private static readonly ILog m_log 44 private static readonly ILog m_log
47 = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); 45 = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
@@ -52,11 +50,10 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Transfer
52 new Dictionary<UUID, Scene>(); 50 new Dictionary<UUID, Scene>();
53 51
54 private IMessageTransferModule m_TransferModule = null; 52 private IMessageTransferModule m_TransferModule = null;
55 private bool m_enabled = true;
56 53
57 #region ISharedRegionModule Members 54 #region IRegionModule Members
58 55
59 public void Initialise(IConfigSource config) 56 public void Initialise(Scene scene, IConfigSource config)
60 { 57 {
61 if (config.Configs["Messaging"] != null) 58 if (config.Configs["Messaging"] != null)
62 { 59 {
@@ -65,61 +62,31 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Transfer
65 if (config.Configs["Messaging"].GetString( 62 if (config.Configs["Messaging"].GetString(
66 "InventoryTransferModule", "InventoryTransferModule") != 63 "InventoryTransferModule", "InventoryTransferModule") !=
67 "InventoryTransferModule") 64 "InventoryTransferModule")
68 m_enabled = false; 65 return;
69 } 66 }
70 }
71
72 public Type ReplaceableInterface
73 {
74 get { return null; }
75 }
76 67
77 public void AddRegion(Scene scene) 68 if (!m_Scenelist.Contains(scene))
78 {
79 if (m_enabled)
80 { 69 {
81 if (!m_Scenelist.Contains(scene)) 70 m_Scenelist.Add(scene);
82 {
83 m_Scenelist.Add(scene);
84 71
85 scene.RegisterModuleInterface<IInventoryTransferModule>(this); 72 scene.RegisterModuleInterface<IInventoryTransferModule>(this);
86 73
87 scene.EventManager.OnNewClient += OnNewClient; 74 scene.EventManager.OnNewClient += OnNewClient;
88 scene.EventManager.OnClientClosed += ClientLoggedOut; 75 scene.EventManager.OnClientClosed += ClientLoggedOut;
89 scene.EventManager.OnIncomingInstantMessage += OnGridInstantMessage; 76 scene.EventManager.OnIncomingInstantMessage += OnGridInstantMessage;
90 }
91 } 77 }
92 } 78 }
93 79
94 public void RegionLoaded(Scene scene) 80 public void PostInitialise()
95 { 81 {
96 if (m_enabled) 82 if (m_Scenelist.Count > 0)
97 { 83 {
98 if (m_Scenelist.Count > 0) 84 m_TransferModule = m_Scenelist[0].RequestModuleInterface<IMessageTransferModule>();
99 { 85 if (m_TransferModule == null)
100 m_TransferModule = m_Scenelist[0].RequestModuleInterface<IMessageTransferModule>(); 86 m_log.Error("[INVENTORY TRANSFER] No Message transfer module found, transfers will be local only");
101 if (m_TransferModule == null)
102 m_log.Error("[INVENTORY TRANSFER] No Message transfer module found, transfers will be local only");
103 }
104 } 87 }
105 } 88 }
106 89
107 public void RemoveRegion(Scene scene)
108 {
109 if (m_Scenelist.Contains(scene))
110 m_Scenelist.Remove(scene);
111
112 scene.UnregisterModuleInterface<IInventoryTransferModule>(this);
113
114 scene.EventManager.OnNewClient -= OnNewClient;
115 scene.EventManager.OnClientClosed -= ClientLoggedOut;
116 scene.EventManager.OnIncomingInstantMessage -= OnGridInstantMessage;
117 }
118
119 public void PostInitialise()
120 {
121 }
122
123 public void Close() 90 public void Close()
124 { 91 {
125 } 92 }
diff --git a/OpenSim/Region/CoreModules/Avatar/Lure/LureModule.cs b/OpenSim/Region/CoreModules/Avatar/Lure/LureModule.cs
index 973d27f..261bd6c 100644
--- a/OpenSim/Region/CoreModules/Avatar/Lure/LureModule.cs
+++ b/OpenSim/Region/CoreModules/Avatar/Lure/LureModule.cs
@@ -29,7 +29,6 @@ using System;
29using System.Collections.Generic; 29using System.Collections.Generic;
30using System.Reflection; 30using System.Reflection;
31using log4net; 31using log4net;
32using Mono.Addins;
33using Nini.Config; 32using Nini.Config;
34using OpenMetaverse; 33using OpenMetaverse;
35using OpenSim.Framework; 34using OpenSim.Framework;
@@ -38,72 +37,36 @@ using OpenSim.Region.Framework.Scenes;
38 37
39namespace OpenSim.Region.CoreModules.Avatar.Lure 38namespace OpenSim.Region.CoreModules.Avatar.Lure
40{ 39{
41 [Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule")] 40 public class LureModule : IRegionModule
42 public class LureModule : ISharedRegionModule
43 { 41 {
44 private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); 42 private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
45 43
46 private readonly List<Scene> m_scenes = new List<Scene>(); 44 private readonly List<Scene> m_scenes = new List<Scene>();
47 45
48 private bool m_enabled = true;
49
50 private IMessageTransferModule m_TransferModule = null; 46 private IMessageTransferModule m_TransferModule = null;
51 47
52 public void Initialise(IConfigSource config) 48 public void Initialise(Scene scene, IConfigSource config)
53 { 49 {
54 if (config.Configs["Messaging"] != null) 50 if (config.Configs["Messaging"] != null)
55 { 51 {
56 if (config.Configs["Messaging"].GetString( 52 if (config.Configs["Messaging"].GetString(
57 "LureModule", "LureModule") != 53 "LureModule", "LureModule") !=
58 "LureModule") 54 "LureModule")
59 m_enabled = false; 55 return;
60 } 56 }
61 }
62
63 public Type ReplaceableInterface
64 {
65 get { return null; }
66 }
67 57
68 public void AddRegion(Scene scene) 58 lock (m_scenes)
69 {
70 if (m_enabled)
71 { 59 {
72 lock (m_scenes) 60 if (!m_scenes.Contains(scene))
73 { 61 {
74 if (!m_scenes.Contains(scene)) 62 m_scenes.Add(scene);
75 { 63 scene.EventManager.OnNewClient += OnNewClient;
76 m_scenes.Add(scene); 64 scene.EventManager.OnIncomingInstantMessage +=
77 scene.EventManager.OnNewClient += OnNewClient; 65 OnGridInstantMessage;
78 scene.EventManager.OnIncomingInstantMessage +=
79 OnGridInstantMessage;
80 }
81 } 66 }
82 } 67 }
83 } 68 }
84 69
85 public void RegionLoaded(Scene scene)
86 {
87 if (m_enabled)
88 {
89 m_TransferModule =
90 m_scenes[0].RequestModuleInterface<IMessageTransferModule>();
91
92 if (m_TransferModule == null)
93 m_log.Error("[INSTANT MESSAGE]: No message transfer module, " +
94 "lures will not work!");
95 }
96 }
97
98 public void RemoveRegion(Scene scene)
99 {
100 if (m_scenes.Contains(scene))
101 m_scenes.Remove(scene);
102 scene.EventManager.OnNewClient -= OnNewClient;
103 scene.EventManager.OnIncomingInstantMessage -=
104 OnGridInstantMessage;
105 }
106
107 void OnNewClient(IClientAPI client) 70 void OnNewClient(IClientAPI client)
108 { 71 {
109 client.OnInstantMessage += OnInstantMessage; 72 client.OnInstantMessage += OnInstantMessage;
@@ -113,6 +76,12 @@ namespace OpenSim.Region.CoreModules.Avatar.Lure
113 76
114 public void PostInitialise() 77 public void PostInitialise()
115 { 78 {
79 m_TransferModule =
80 m_scenes[0].RequestModuleInterface<IMessageTransferModule>();
81
82 if (m_TransferModule == null)
83 m_log.Error("[INSTANT MESSAGE]: No message transfer module, "+
84 "lures will not work!");
116 } 85 }
117 86
118 public void Close() 87 public void Close()
diff --git a/OpenSim/Region/CoreModules/Avatar/ObjectCaps/ObjectAdd.cs b/OpenSim/Region/CoreModules/Avatar/ObjectCaps/ObjectAdd.cs
index 748b42c..63a93aa 100644
--- a/OpenSim/Region/CoreModules/Avatar/ObjectCaps/ObjectAdd.cs
+++ b/OpenSim/Region/CoreModules/Avatar/ObjectCaps/ObjectAdd.cs
@@ -29,7 +29,6 @@ using System;
29using System.Collections; 29using System.Collections;
30using System.Reflection; 30using System.Reflection;
31using log4net; 31using log4net;
32using Mono.Addins;
33using Nini.Config; 32using Nini.Config;
34using OpenMetaverse; 33using OpenMetaverse;
35using OpenMetaverse.StructuredData; 34using OpenMetaverse.StructuredData;
@@ -42,54 +41,24 @@ using Caps=OpenSim.Framework.Capabilities.Caps;
42 41
43namespace OpenSim.Region.CoreModules.Avatar.ObjectCaps 42namespace OpenSim.Region.CoreModules.Avatar.ObjectCaps
44{ 43{
45 [Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule")] 44 public class ObjectAdd : IRegionModule
46 public class ObjectAdd : ISharedRegionModule
47 { 45 {
48 private static readonly ILog m_log = 46 private static readonly ILog m_log =
49 LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); 47 LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
50 private Scene m_scene; 48 private Scene m_scene;
51 #region ISharedRegionModule Members 49 #region IRegionModule Members
52 50
53 public void Initialise(IConfigSource pSource) 51 public void Initialise(Scene pScene, IConfigSource pSource)
54 { 52 {
55 53 m_scene = pScene;
56 }
57
58 public Type ReplaceableInterface
59 {
60 get { return null; }
61 }
62
63 public void AddRegion(Scene scene)
64 {
65 m_scene = scene;
66 m_scene.EventManager.OnRegisterCaps += RegisterCaps; 54 m_scene.EventManager.OnRegisterCaps += RegisterCaps;
67 } 55 }
68 56
69 public void RegionLoaded(Scene scene)
70 {
71 }
72
73 public void RemoveRegion(Scene scene)
74 {
75 scene.EventManager.OnRegisterCaps -= RegisterCaps;
76 }
77
78 public void PostInitialise() 57 public void PostInitialise()
79 { 58 {
80 59
81 } 60 }
82 61
83 public void Close()
84 {
85
86 }
87
88 public string Name
89 {
90 get { return "ObjectAddModule"; }
91 }
92
93 public void RegisterCaps(UUID agentID, Caps caps) 62 public void RegisterCaps(UUID agentID, Caps caps)
94 { 63 {
95 UUID capuuid = UUID.Random(); 64 UUID capuuid = UUID.Random();
@@ -379,6 +348,22 @@ namespace OpenSim.Region.CoreModules.Avatar.ObjectCaps
379 Array.Reverse(resultbytes); 348 Array.Reverse(resultbytes);
380 return String.Format("<binary encoding=\"base64\">{0}</binary>",Convert.ToBase64String(resultbytes)); 349 return String.Format("<binary encoding=\"base64\">{0}</binary>",Convert.ToBase64String(resultbytes));
381 } 350 }
351
352 public void Close()
353 {
354
355 }
356
357 public string Name
358 {
359 get { return "ObjectAddModule"; }
360 }
361
362 public bool IsSharedModule
363 {
364 get { return false; }
365 }
366
382 #endregion 367 #endregion
383 } 368 }
384} 369}
diff --git a/OpenSim/Region/CoreModules/Avatar/Profiles/AvatarProfilesModule.cs b/OpenSim/Region/CoreModules/Avatar/Profiles/AvatarProfilesModule.cs
index 7fcb0e1..8cf58c6 100644
--- a/OpenSim/Region/CoreModules/Avatar/Profiles/AvatarProfilesModule.cs
+++ b/OpenSim/Region/CoreModules/Avatar/Profiles/AvatarProfilesModule.cs
@@ -30,7 +30,6 @@ using System.Collections;
30using System.Globalization; 30using System.Globalization;
31using System.Reflection; 31using System.Reflection;
32using log4net; 32using log4net;
33using Mono.Addins;
34using Nini.Config; 33using Nini.Config;
35using OpenMetaverse; 34using OpenMetaverse;
36using OpenSim.Framework; 35using OpenSim.Framework;
@@ -39,17 +38,20 @@ using OpenSim.Region.Framework.Scenes;
39 38
40namespace OpenSim.Region.CoreModules.Avatar.Profiles 39namespace OpenSim.Region.CoreModules.Avatar.Profiles
41{ 40{
42 [Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule")] 41 public class AvatarProfilesModule : IRegionModule
43 public class AvatarProfilesModule : INonSharedRegionModule
44 { 42 {
45 private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); 43 private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
46 private Scene m_scene; 44 private Scene m_scene;
47 private IProfileModule m_profileModule = null; 45 private IProfileModule m_profileModule = null;
48 private bool m_enabled = true; 46 private bool m_enabled = true;
49 47
50 #region INonSharedRegionModule Members 48 public AvatarProfilesModule()
49 {
50 }
51 51
52 public void Initialise(IConfigSource config) 52 #region IRegionModule Members
53
54 public void Initialise(Scene scene, IConfigSource config)
53 { 55 {
54 IConfig profileConfig = config.Configs["Profile"]; 56 IConfig profileConfig = config.Configs["Profile"];
55 if (profileConfig != null) 57 if (profileConfig != null)
@@ -60,31 +62,18 @@ namespace OpenSim.Region.CoreModules.Avatar.Profiles
60 return; 62 return;
61 } 63 }
62 } 64 }
63 }
64
65 public Type ReplaceableInterface
66 {
67 get { return null; }
68 }
69 65
70 public void AddRegion(Scene scene)
71 {
72 m_scene = scene; 66 m_scene = scene;
73 m_scene.EventManager.OnNewClient += NewClient; 67 m_scene.EventManager.OnNewClient += NewClient;
74 } 68 }
75 69
76 public void RegionLoaded(Scene scene) 70 public void PostInitialise()
77 { 71 {
78 if (!m_enabled) 72 if (!m_enabled)
79 return; 73 return;
80 m_profileModule = m_scene.RequestModuleInterface<IProfileModule>(); 74 m_profileModule = m_scene.RequestModuleInterface<IProfileModule>();
81 } 75 }
82 76
83 public void RemoveRegion(Scene scene)
84 {
85 scene.EventManager.OnNewClient -= NewClient;
86 }
87
88 public void Close() 77 public void Close()
89 { 78 {
90 } 79 }
@@ -94,6 +83,11 @@ namespace OpenSim.Region.CoreModules.Avatar.Profiles
94 get { return "AvatarProfilesModule"; } 83 get { return "AvatarProfilesModule"; }
95 } 84 }
96 85
86 public bool IsSharedModule
87 {
88 get { return false; }
89 }
90
97 #endregion 91 #endregion
98 92
99 public void NewClient(IClientAPI client) 93 public void NewClient(IClientAPI client)