aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/CoreModules/Avatar/Profiles/AvatarProfilesModule.cs
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--OpenSim/Region/CoreModules/Avatar/Profiles/AvatarProfilesModule.cs32
1 files changed, 19 insertions, 13 deletions
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;
30using System.Globalization; 30using System.Globalization;
31using System.Reflection; 31using System.Reflection;
32using log4net; 32using log4net;
33using Mono.Addins;
33using Nini.Config; 34using Nini.Config;
34using OpenMetaverse; 35using OpenMetaverse;
35using OpenSim.Framework; 36using OpenSim.Framework;
@@ -38,20 +39,17 @@ using OpenSim.Region.Framework.Scenes;
38 39
39namespace OpenSim.Region.CoreModules.Avatar.Profiles 40namespace OpenSim.Region.CoreModules.Avatar.Profiles
40{ 41{
41 public class AvatarProfilesModule : IRegionModule 42 [Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule")]
43 public class AvatarProfilesModule : INonSharedRegionModule
42 { 44 {
43 private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); 45 private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
44 private Scene m_scene; 46 private Scene m_scene;
45 private IProfileModule m_profileModule = null; 47 private IProfileModule m_profileModule = null;
46 private bool m_enabled = true; 48 private bool m_enabled = true;
47 49
48 public AvatarProfilesModule() 50 #region INonSharedRegionModule Members
49 {
50 }
51 51
52 #region IRegionModule Members 52 public void Initialise(IConfigSource config)
53
54 public void Initialise(Scene scene, IConfigSource config)
55 { 53 {
56 IConfig profileConfig = config.Configs["Profile"]; 54 IConfig profileConfig = config.Configs["Profile"];
57 if (profileConfig != null) 55 if (profileConfig != null)
@@ -62,30 +60,38 @@ namespace OpenSim.Region.CoreModules.Avatar.Profiles
62 return; 60 return;
63 } 61 }
64 } 62 }
63 }
64
65 public Type ReplaceableInterface
66 {
67 get { return null; }
68 }
65 69
70 public void AddRegion(Scene scene)
71 {
66 m_scene = scene; 72 m_scene = scene;
67 m_scene.EventManager.OnNewClient += NewClient; 73 m_scene.EventManager.OnNewClient += NewClient;
68 } 74 }
69 75
70 public void PostInitialise() 76 public void RegionLoaded(Scene scene)
71 { 77 {
72 if (!m_enabled) 78 if (!m_enabled)
73 return; 79 return;
74 m_profileModule = m_scene.RequestModuleInterface<IProfileModule>(); 80 m_profileModule = m_scene.RequestModuleInterface<IProfileModule>();
75 } 81 }
76 82
77 public void Close() 83 public void RemoveRegion(Scene scene)
78 { 84 {
85 scene.EventManager.OnNewClient -= NewClient;
79 } 86 }
80 87
81 public string Name 88 public void Close()
82 { 89 {
83 get { return "AvatarProfilesModule"; }
84 } 90 }
85 91
86 public bool IsSharedModule 92 public string Name
87 { 93 {
88 get { return false; } 94 get { return "AvatarProfilesModule"; }
89 } 95 }
90 96
91 #endregion 97 #endregion