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