public void Initialise(IConfigSource config) { // wrap this in a try block so that defaults will work if // the config file doesn't specify otherwise. int maxlisteners = 1000; int maxhandles = 64; try { m_whisperdistance = config.Configs["Chat"].GetInt( "whisper_distance", m_whisperdistance); m_saydistance = config.Configs["Chat"].GetInt( "say_distance", m_saydistance); m_shoutdistance = config.Configs["Chat"].GetInt( "shout_distance", m_shoutdistance); maxlisteners = config.Configs["LL-Functions"].GetInt( "max_listens_per_region", maxlisteners); maxhandles = config.Configs["LL-Functions"].GetInt( "max_listens_per_script", maxhandles); } catch (Exception) { } if (maxlisteners < 1) { maxlisteners = int.MaxValue; } if (maxhandles < 1) { maxhandles = int.MaxValue; } m_listenerManager = new ListenerManager(maxlisteners, maxhandles); m_pending = new ThreadedClasses.NonblockingQueue <ListenerInfo>(); }
public void Initialise(Scene scene, IConfigSource config) { // wrap this in a try block so that defaults will work if // the config file doesn't specify otherwise. int maxlisteners = 1000; int maxhandles = 64; try { m_whisperdistance = config.Configs["Chat"].GetInt("whisper_distance", m_whisperdistance); m_saydistance = config.Configs["Chat"].GetInt("say_distance", m_saydistance); m_shoutdistance = config.Configs["Chat"].GetInt("shout_distance", m_shoutdistance); maxlisteners = config.Configs["LL-Functions"].GetInt("max_listens_per_region", maxlisteners); maxhandles = config.Configs["LL-Functions"].GetInt("max_listens_per_script", maxhandles); } catch (Exception) { } if (maxlisteners < 1) { maxlisteners = int.MaxValue; } if (maxhandles < 1) { maxhandles = int.MaxValue; } m_scene = scene; m_scene.RegisterModuleInterface <IWorldComm>(this); m_listenerManager = new ListenerManager(maxlisteners, maxhandles); m_scene.EventManager.OnChatFromClient += DeliverClientMessage; m_scene.EventManager.OnChatBroadcast += DeliverClientMessage; m_pendingQ = new Queue(); m_pending = Queue.Synchronized(m_pendingQ); }
public void Initialise(IConfigSource config) { // wrap this in a try block so that defaults will work if // the config file doesn't specify otherwise. int maxlisteners = 1000; int maxhandles = 64; try { m_whisperdistance = config.Configs["AuroraChat"].GetInt("whisper_distance", m_whisperdistance); m_saydistance = config.Configs["AuroraChat"].GetInt("say_distance", m_saydistance); m_shoutdistance = config.Configs["AuroraChat"].GetInt("shout_distance", m_shoutdistance); maxlisteners = config.Configs["AuroraChat"].GetInt("max_listens_per_region", maxlisteners); maxhandles = config.Configs["AuroraChat"].GetInt("max_listens_per_script", maxhandles); } catch (Exception) { } if (maxlisteners < 1) { maxlisteners = int.MaxValue; } if (maxhandles < 1) { maxhandles = int.MaxValue; } m_listenerManager = new ListenerManager(maxlisteners, maxhandles); m_pendingQ = new Queue(); m_pending = Queue.Synchronized(m_pendingQ); }
public void Initialise(IConfigSource config) { // wrap this in a try block so that defaults will work if // the config file doesn't specify otherwise. int maxlisteners = 1000; int maxhandles = 64; try { m_whisperdistance = config.Configs["Chat"].GetInt( "whisper_distance", m_whisperdistance); m_saydistance = config.Configs["Chat"].GetInt( "say_distance", m_saydistance); m_shoutdistance = config.Configs["Chat"].GetInt( "shout_distance", m_shoutdistance); maxlisteners = config.Configs["LL-Functions"].GetInt( "max_listens_per_region", maxlisteners); maxhandles = config.Configs["LL-Functions"].GetInt( "max_listens_per_script", maxhandles); } catch (Exception) { } if (maxlisteners < 1) maxlisteners = int.MaxValue; if (maxhandles < 1) maxhandles = int.MaxValue; m_listenerManager = new ListenerManager(maxlisteners, maxhandles); m_pendingQ = new Queue(); m_pending = Queue.Synchronized(m_pendingQ); }
public void Initialise(Scene scene, IConfigSource config) { // wrap this in a try block so that defaults will work if // the config file doesn't specify otherwise. int maxlisteners = 1000; int maxhandles = 64; try { m_whisperdistance = config.Configs["Chat"].GetInt("whisper_distance", m_whisperdistance); m_saydistance = config.Configs["Chat"].GetInt("say_distance", m_saydistance); m_shoutdistance = config.Configs["Chat"].GetInt("shout_distance", m_shoutdistance); maxlisteners = config.Configs["LL-Functions"].GetInt("max_listens_per_region", maxlisteners); maxhandles = config.Configs["LL-Functions"].GetInt("max_listens_per_script", maxhandles); } catch (Exception) { } if (maxlisteners < 1) maxlisteners = int.MaxValue; if (maxhandles < 1) maxhandles = int.MaxValue; m_scene = scene; m_scene.RegisterModuleInterface<IWorldComm>(this); m_listenerManager = new ListenerManager(maxlisteners, maxhandles); m_scene.EventManager.OnChatFromClient += DeliverClientMessage; m_scene.EventManager.OnChatBroadcast += DeliverClientMessage; m_pendingQ = new Queue(); m_pending = Queue.Synchronized(m_pendingQ); }