diff options
author | Melanie | 2010-01-29 07:20:13 +0000 |
---|---|---|
committer | Melanie | 2010-01-29 07:20:13 +0000 |
commit | cfca9e1e811f6cdea6b7c3338f7f783a07f8e0ac (patch) | |
tree | 43f3fd01f30651d482f81b5ae7c25fd84cc8ca37 /OpenSim/Region/CoreModules/Avatar/InstantMessage/OfflineMessageModule.cs | |
parent | Merge branch 'master' into careminster (diff) | |
download | opensim-SC_OLD-cfca9e1e811f6cdea6b7c3338f7f783a07f8e0ac.zip opensim-SC_OLD-cfca9e1e811f6cdea6b7c3338f7f783a07f8e0ac.tar.gz opensim-SC_OLD-cfca9e1e811f6cdea6b7c3338f7f783a07f8e0ac.tar.bz2 opensim-SC_OLD-cfca9e1e811f6cdea6b7c3338f7f783a07f8e0ac.tar.xz |
Revert "Updates all IRegionModules to the new style region modules."
This reverts commit ec3c31e61e5e540f822891110df9bc978655bbaf.
Diffstat (limited to 'OpenSim/Region/CoreModules/Avatar/InstantMessage/OfflineMessageModule.cs')
-rw-r--r-- | OpenSim/Region/CoreModules/Avatar/InstantMessage/OfflineMessageModule.cs | 41 |
1 files changed, 12 insertions, 29 deletions
diff --git a/OpenSim/Region/CoreModules/Avatar/InstantMessage/OfflineMessageModule.cs b/OpenSim/Region/CoreModules/Avatar/InstantMessage/OfflineMessageModule.cs index 8f289c0..0727fa9 100644 --- a/OpenSim/Region/CoreModules/Avatar/InstantMessage/OfflineMessageModule.cs +++ b/OpenSim/Region/CoreModules/Avatar/InstantMessage/OfflineMessageModule.cs | |||
@@ -28,7 +28,6 @@ using System; | |||
28 | using System.Collections.Generic; | 28 | using System.Collections.Generic; |
29 | using System.Reflection; | 29 | using System.Reflection; |
30 | using log4net; | 30 | using log4net; |
31 | using Mono.Addins; | ||
32 | using Nini.Config; | 31 | using Nini.Config; |
33 | using OpenMetaverse; | 32 | using OpenMetaverse; |
34 | using OpenSim.Framework; | 33 | using OpenSim.Framework; |
@@ -41,8 +40,7 @@ using OpenSim.Region.Framework.Scenes; | |||
41 | 40 | ||
42 | namespace OpenSim.Region.CoreModules.Avatar.InstantMessage | 41 | namespace 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 | } |