aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/CoreModules/Framework/EventQueue/EventQueueGetModule.cs
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--OpenSim/Region/CoreModules/Framework/EventQueue/EventQueueGetModule.cs40
1 files changed, 15 insertions, 25 deletions
diff --git a/OpenSim/Region/CoreModules/Framework/EventQueue/EventQueueGetModule.cs b/OpenSim/Region/CoreModules/Framework/EventQueue/EventQueueGetModule.cs
index 1ee6f0d..0c6cb1b 100644
--- a/OpenSim/Region/CoreModules/Framework/EventQueue/EventQueueGetModule.cs
+++ b/OpenSim/Region/CoreModules/Framework/EventQueue/EventQueueGetModule.cs
@@ -32,7 +32,6 @@ using System.Net;
32using System.Reflection; 32using System.Reflection;
33using System.Threading; 33using System.Threading;
34using log4net; 34using log4net;
35using Mono.Addins;
36using Nini.Config; 35using Nini.Config;
37using OpenMetaverse; 36using OpenMetaverse;
38using OpenMetaverse.Packets; 37using OpenMetaverse.Packets;
@@ -53,13 +52,11 @@ namespace OpenSim.Region.CoreModules.Framework.EventQueue
53 public OSDMap body; 52 public OSDMap body;
54 } 53 }
55 54
56 [Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule")] 55 public class EventQueueGetModule : IEventQueue, IRegionModule
57 public class EventQueueGetModule : IEventQueue, INonSharedRegionModule
58 { 56 {
59 private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); 57 private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
60 protected Scene m_scene = null; 58 protected Scene m_scene = null;
61 private IConfigSource m_gConfig; 59 private IConfigSource m_gConfig;
62 private IConfig m_startupConfig;
63 bool enabledYN = false; 60 bool enabledYN = false;
64 61
65 private Dictionary<UUID, int> m_ids = new Dictionary<UUID, int>(); 62 private Dictionary<UUID, int> m_ids = new Dictionary<UUID, int>();
@@ -68,31 +65,23 @@ namespace OpenSim.Region.CoreModules.Framework.EventQueue
68 private Dictionary<UUID, UUID> m_QueueUUIDAvatarMapping = new Dictionary<UUID, UUID>(); 65 private Dictionary<UUID, UUID> m_QueueUUIDAvatarMapping = new Dictionary<UUID, UUID>();
69 private Dictionary<UUID, UUID> m_AvatarQueueUUIDMapping = new Dictionary<UUID, UUID>(); 66 private Dictionary<UUID, UUID> m_AvatarQueueUUIDMapping = new Dictionary<UUID, UUID>();
70 67
71 #region INonSharedRegionModule methods 68 #region IRegionModule methods
72 public virtual void Initialise(IConfigSource config) 69 public virtual void Initialise(Scene scene, IConfigSource config)
73 { 70 {
74 m_gConfig = config; 71 m_gConfig = config;
75 72
76 m_startupConfig = m_gConfig.Configs["Startup"]; 73 IConfig startupConfig = m_gConfig.Configs["Startup"];
77 }
78 74
79 public Type ReplaceableInterface 75 ReadConfigAndPopulate(scene, startupConfig, "Startup");
80 {
81 get { return null; }
82 }
83
84 public void AddRegion(Scene scene)
85 {
86 ReadConfigAndPopulate(scene, m_startupConfig, "Startup");
87 76
88 if (enabledYN) 77 if (enabledYN)
89 { 78 {
90 m_scene = scene; 79 m_scene = scene;
91 scene.RegisterModuleInterface<IEventQueue>(this); 80 scene.RegisterModuleInterface<IEventQueue>(this);
92 81
93 // Register fallback handler 82 // Register fallback handler
94 // Why does EQG Fail on region crossings! 83 // Why does EQG Fail on region crossings!
95 84
96 //scene.CommsManager.HttpServer.AddLLSDHandler("/CAPS/EQG/", EventQueueFallBack); 85 //scene.CommsManager.HttpServer.AddLLSDHandler("/CAPS/EQG/", EventQueueFallBack);
97 86
98 scene.EventManager.OnNewClient += OnNewClient; 87 scene.EventManager.OnNewClient += OnNewClient;
@@ -110,19 +99,16 @@ namespace OpenSim.Region.CoreModules.Framework.EventQueue
110 { 99 {
111 m_gConfig = null; 100 m_gConfig = null;
112 } 101 }
102
113 } 103 }
114 104
115 public void RegionLoaded(Scene scene) 105 private void ReadConfigAndPopulate(Scene scene, IConfig startupConfig, string p)
116 {
117 }
118
119 public void RemoveRegion(Scene scene)
120 { 106 {
107 enabledYN = startupConfig.GetBoolean("EventQueue", true);
121 } 108 }
122 109
123 private void ReadConfigAndPopulate(Scene scene, IConfig startupConfig, string p) 110 public void PostInitialise()
124 { 111 {
125 enabledYN = startupConfig.GetBoolean("EventQueue", true);
126 } 112 }
127 113
128 public virtual void Close() 114 public virtual void Close()
@@ -134,6 +120,10 @@ namespace OpenSim.Region.CoreModules.Framework.EventQueue
134 get { return "EventQueueGetModule"; } 120 get { return "EventQueueGetModule"; }
135 } 121 }
136 122
123 public bool IsSharedModule
124 {
125 get { return false; }
126 }
137 #endregion 127 #endregion
138 128
139 /// <summary> 129 /// <summary>