aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Environment/Modules
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region/Environment/Modules')
-rw-r--r--OpenSim/Region/Environment/Modules/Framework/EventQueueGetModule.cs29
1 files changed, 19 insertions, 10 deletions
diff --git a/OpenSim/Region/Environment/Modules/Framework/EventQueueGetModule.cs b/OpenSim/Region/Environment/Modules/Framework/EventQueueGetModule.cs
index ebaa406..14574e0 100644
--- a/OpenSim/Region/Environment/Modules/Framework/EventQueueGetModule.cs
+++ b/OpenSim/Region/Environment/Modules/Framework/EventQueueGetModule.cs
@@ -63,6 +63,7 @@ namespace OpenSim.Region.Environment.Modules.Framework
63 private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); 63 private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
64 private Scene m_scene = null; 64 private Scene m_scene = null;
65 private IConfigSource m_gConfig; 65 private IConfigSource m_gConfig;
66 bool enabledYN = false;
66 67
67 private Dictionary<UUID, int> m_ids = new Dictionary<UUID, int>(); 68 private Dictionary<UUID, int> m_ids = new Dictionary<UUID, int>();
68 69
@@ -72,26 +73,34 @@ namespace OpenSim.Region.Environment.Modules.Framework
72 public void Initialise(Scene scene, IConfigSource config) 73 public void Initialise(Scene scene, IConfigSource config)
73 { 74 {
74 m_gConfig = config; 75 m_gConfig = config;
75 m_scene = scene; 76
76 77
77 78
78 IConfig startupConfig = m_gConfig.Configs["Startup"]; 79 IConfig startupConfig = m_gConfig.Configs["Startup"];
79 80
80 ReadConfigAndPopulate(scene, startupConfig, "Startup"); 81 ReadConfigAndPopulate(scene, startupConfig, "Startup");
81 82
82 scene.RegisterModuleInterface<IEventQueue>(this); 83 if (enabledYN)
83 84 {
84 scene.EventManager.OnNewClient += OnNewClient; 85 m_scene = scene;
85 scene.EventManager.OnClientClosed += ClientClosed; 86 scene.RegisterModuleInterface<IEventQueue>(this);
86 scene.EventManager.OnAvatarEnteringNewParcel += AvatarEnteringParcel; 87
87 scene.EventManager.OnMakeChildAgent += MakeChildAgent; 88 scene.EventManager.OnNewClient += OnNewClient;
88 scene.EventManager.OnRegisterCaps += OnRegisterCaps; 89 scene.EventManager.OnClientClosed += ClientClosed;
90 scene.EventManager.OnAvatarEnteringNewParcel += AvatarEnteringParcel;
91 scene.EventManager.OnMakeChildAgent += MakeChildAgent;
92 scene.EventManager.OnRegisterCaps += OnRegisterCaps;
93 }
94 else
95 {
96 m_gConfig = null;
97 }
89 98
90 } 99 }
91 100
92 private void ReadConfigAndPopulate(Scene scene, IConfig startupConfig, string p) 101 private void ReadConfigAndPopulate(Scene scene, IConfig startupConfig, string p)
93 { 102 {
94 103 enabledYN = startupConfig.GetBoolean("EventQueue", false);
95 } 104 }
96 105
97 public void PostInitialise() 106 public void PostInitialise()