diff options
author | Justin Clarke Casey | 2009-02-02 17:22:20 +0000 |
---|---|---|
committer | Justin Clarke Casey | 2009-02-02 17:22:20 +0000 |
commit | 6f9c1e3bcc5b3d6f0a3b87c76048b619453ceae4 (patch) | |
tree | 18943baf9ea0549f506899577d70202d90934701 /OpenSim/Region | |
parent | * Small tweak to move name replacement in friendship offer since server side ... (diff) | |
download | opensim-SC_OLD-6f9c1e3bcc5b3d6f0a3b87c76048b619453ceae4.zip opensim-SC_OLD-6f9c1e3bcc5b3d6f0a3b87c76048b619453ceae4.tar.gz opensim-SC_OLD-6f9c1e3bcc5b3d6f0a3b87c76048b619453ceae4.tar.bz2 opensim-SC_OLD-6f9c1e3bcc5b3d6f0a3b87c76048b619453ceae4.tar.xz |
* Stop the instant message module from trying to register for the message transfer module in PostInitialise() if it hasn't actually been enabled
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Region/Environment/Modules/Avatar/InstantMessage/InstantMessageModule.cs | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/OpenSim/Region/Environment/Modules/Avatar/InstantMessage/InstantMessageModule.cs b/OpenSim/Region/Environment/Modules/Avatar/InstantMessage/InstantMessageModule.cs index 88c0680..747469b 100644 --- a/OpenSim/Region/Environment/Modules/Avatar/InstantMessage/InstantMessageModule.cs +++ b/OpenSim/Region/Environment/Modules/Avatar/InstantMessage/InstantMessageModule.cs | |||
@@ -44,14 +44,17 @@ namespace OpenSim.Region.Environment.Modules.Avatar.InstantMessage | |||
44 | { | 44 | { |
45 | public class InstantMessageModule : IRegionModule | 45 | public class InstantMessageModule : IRegionModule |
46 | { | 46 | { |
47 | private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); | 47 | private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); |
48 | 48 | ||
49 | /// <value> | ||
50 | /// Is this module enabled? | ||
51 | /// </value> | ||
52 | private bool m_enabled = false; | ||
53 | |||
49 | private readonly List<Scene> m_scenes = new List<Scene>(); | 54 | private readonly List<Scene> m_scenes = new List<Scene>(); |
50 | 55 | ||
51 | #region IRegionModule Members | 56 | #region IRegionModule Members |
52 | 57 | ||
53 | //private bool gridmode = false; | ||
54 | |||
55 | private IMessageTransferModule m_TransferModule = null; | 58 | private IMessageTransferModule m_TransferModule = null; |
56 | 59 | ||
57 | public void Initialise(Scene scene, IConfigSource config) | 60 | public void Initialise(Scene scene, IConfigSource config) |
@@ -63,6 +66,8 @@ namespace OpenSim.Region.Environment.Modules.Avatar.InstantMessage | |||
63 | "InstantMessageModule") | 66 | "InstantMessageModule") |
64 | return; | 67 | return; |
65 | } | 68 | } |
69 | |||
70 | m_enabled = true; | ||
66 | 71 | ||
67 | lock (m_scenes) | 72 | lock (m_scenes) |
68 | { | 73 | { |
@@ -86,6 +91,9 @@ namespace OpenSim.Region.Environment.Modules.Avatar.InstantMessage | |||
86 | 91 | ||
87 | public void PostInitialise() | 92 | public void PostInitialise() |
88 | { | 93 | { |
94 | if (!m_enabled) | ||
95 | return; | ||
96 | |||
89 | m_TransferModule = | 97 | m_TransferModule = |
90 | m_scenes[0].RequestModuleInterface<IMessageTransferModule>(); | 98 | m_scenes[0].RequestModuleInterface<IMessageTransferModule>(); |
91 | 99 | ||