diff options
author | Revolution | 2010-01-22 18:09:33 -0600 |
---|---|---|
committer | Melanie | 2010-01-23 15:18:52 +0000 |
commit | ec3c31e61e5e540f822891110df9bc978655bbaf (patch) | |
tree | b0b34a239eab48e163a3ca064edcd7567948423c /OpenSim/Region/CoreModules/Avatar/Profiles | |
parent | add a target position to agent updates to ScenePresence to support alternativ... (diff) | |
download | opensim-SC_OLD-ec3c31e61e5e540f822891110df9bc978655bbaf.zip opensim-SC_OLD-ec3c31e61e5e540f822891110df9bc978655bbaf.tar.gz opensim-SC_OLD-ec3c31e61e5e540f822891110df9bc978655bbaf.tar.bz2 opensim-SC_OLD-ec3c31e61e5e540f822891110df9bc978655bbaf.tar.xz |
Updates all IRegionModules to the new style region modules.
Signed-off-by: Melanie <melanie@t-data.com>
Diffstat (limited to 'OpenSim/Region/CoreModules/Avatar/Profiles')
-rw-r--r-- | OpenSim/Region/CoreModules/Avatar/Profiles/AvatarProfilesModule.cs | 32 |
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; | |||
30 | using System.Globalization; | 30 | using System.Globalization; |
31 | using System.Reflection; | 31 | using System.Reflection; |
32 | using log4net; | 32 | using log4net; |
33 | using Mono.Addins; | ||
33 | using Nini.Config; | 34 | using Nini.Config; |
34 | using OpenMetaverse; | 35 | using OpenMetaverse; |
35 | using OpenSim.Framework; | 36 | using OpenSim.Framework; |
@@ -38,20 +39,17 @@ using OpenSim.Region.Framework.Scenes; | |||
38 | 39 | ||
39 | namespace OpenSim.Region.CoreModules.Avatar.Profiles | 40 | namespace 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 |