* Small voice chat fix

0.6.0-stable
Adam Frisby 2008-02-26 11:32:46 +00:00
parent e7b785f9a0
commit a2c639d668
1 changed files with 9 additions and 6 deletions

View File

@ -34,18 +34,21 @@ namespace OpenSim.Region.Environment.Modules.VoiceChat
public void Initialise(Scene scene, Nini.Config.IConfigSource source) 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 try
{ {
m_enabled = source.Configs["Voice"].GetBoolean("enabled", m_enabled); m_enabled = source.Configs["Voice"].GetBoolean("enabled", m_enabled);
} }
catch (Exception) 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() public void PostInitialise()