From a2c639d6688ad8957027f8b91417fa4163912c10 Mon Sep 17 00:00:00 2001 From: Adam Frisby Date: Tue, 26 Feb 2008 11:32:46 +0000 Subject: * Small voice chat fix --- .../Environment/Modules/VoiceChat/VoiceChatServer.cs | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) (limited to 'OpenSim/Region/Environment/Modules/VoiceChat') diff --git a/OpenSim/Region/Environment/Modules/VoiceChat/VoiceChatServer.cs b/OpenSim/Region/Environment/Modules/VoiceChat/VoiceChatServer.cs index 3f6e346..ad42216 100644 --- a/OpenSim/Region/Environment/Modules/VoiceChat/VoiceChatServer.cs +++ b/OpenSim/Region/Environment/Modules/VoiceChat/VoiceChatServer.cs @@ -34,18 +34,21 @@ namespace OpenSim.Region.Environment.Modules.VoiceChat public void Initialise(Scene scene, Nini.Config.IConfigSource source) { - if (!m_scenes.Contains(scene)) - m_scenes.Add(scene); - - scene.EventManager.OnNewClient += NewClient; - scene.EventManager.OnRemovePresence += RemovePresence; - try { m_enabled = source.Configs["Voice"].GetBoolean("enabled", m_enabled); } catch (Exception) { } + + if (m_enabled) + { + if (!m_scenes.Contains(scene)) + m_scenes.Add(scene); + + scene.EventManager.OnNewClient += NewClient; + scene.EventManager.OnRemovePresence += RemovePresence; + } } public void PostInitialise() -- cgit v1.1