diff options
author | Revolution | 2010-01-22 18:09:33 -0600 |
---|---|---|
committer | Melanie | 2010-01-23 15:18:52 +0000 |
commit | ec3c31e61e5e540f822891110df9bc978655bbaf (patch) | |
tree | b0b34a239eab48e163a3ca064edcd7567948423c /OpenSim/Region/UserStatistics/WebStatsModule.cs | |
parent | add a target position to agent updates to ScenePresence to support alternativ... (diff) | |
download | opensim-SC_OLD-ec3c31e61e5e540f822891110df9bc978655bbaf.zip opensim-SC_OLD-ec3c31e61e5e540f822891110df9bc978655bbaf.tar.gz opensim-SC_OLD-ec3c31e61e5e540f822891110df9bc978655bbaf.tar.bz2 opensim-SC_OLD-ec3c31e61e5e540f822891110df9bc978655bbaf.tar.xz |
Updates all IRegionModules to the new style region modules.
Signed-off-by: Melanie <melanie@t-data.com>
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Region/UserStatistics/WebStatsModule.cs | 33 |
1 files changed, 22 insertions, 11 deletions
diff --git a/OpenSim/Region/UserStatistics/WebStatsModule.cs b/OpenSim/Region/UserStatistics/WebStatsModule.cs index a03cc4c..9b53d06 100644 --- a/OpenSim/Region/UserStatistics/WebStatsModule.cs +++ b/OpenSim/Region/UserStatistics/WebStatsModule.cs | |||
@@ -34,6 +34,7 @@ using System.Reflection; | |||
34 | using System.Text; | 34 | using System.Text; |
35 | using System.Threading; | 35 | using System.Threading; |
36 | using log4net; | 36 | using log4net; |
37 | using Mono.Addins; | ||
37 | using Nini.Config; | 38 | using Nini.Config; |
38 | using OpenMetaverse; | 39 | using OpenMetaverse; |
39 | using OpenMetaverse.StructuredData; | 40 | using OpenMetaverse.StructuredData; |
@@ -52,7 +53,8 @@ using OSDMap = OpenMetaverse.StructuredData.OSDMap; | |||
52 | 53 | ||
53 | namespace OpenSim.Region.UserStatistics | 54 | namespace OpenSim.Region.UserStatistics |
54 | { | 55 | { |
55 | public class WebStatsModule : IRegionModule | 56 | [Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule")] |
57 | public class WebStatsModule : ISharedRegionModule | ||
56 | { | 58 | { |
57 | private static readonly ILog m_log = | 59 | private static readonly ILog m_log = |
58 | LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); | 60 | LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); |
@@ -70,7 +72,7 @@ namespace OpenSim.Region.UserStatistics | |||
70 | private string m_loglines = String.Empty; | 72 | private string m_loglines = String.Empty; |
71 | private volatile int lastHit = 12000; | 73 | private volatile int lastHit = 12000; |
72 | 74 | ||
73 | public virtual void Initialise(Scene scene, IConfigSource config) | 75 | public virtual void Initialise(IConfigSource config) |
74 | { | 76 | { |
75 | IConfig cnfg; | 77 | IConfig cnfg; |
76 | try | 78 | try |
@@ -82,11 +84,17 @@ namespace OpenSim.Region.UserStatistics | |||
82 | { | 84 | { |
83 | enabled = false; | 85 | enabled = false; |
84 | } | 86 | } |
85 | 87 | } | |
88 | |||
89 | public Type ReplaceableInterface | ||
90 | { | ||
91 | get { return null; } | ||
92 | } | ||
93 | |||
94 | public void AddRegion(Scene scene) | ||
95 | { | ||
86 | if (!enabled) | 96 | if (!enabled) |
87 | { | ||
88 | return; | 97 | return; |
89 | } | ||
90 | 98 | ||
91 | lock (m_scene) | 99 | lock (m_scene) |
92 | { | 100 | { |
@@ -130,7 +138,7 @@ namespace OpenSim.Region.UserStatistics | |||
130 | MainServer.Instance.AddHTTPHandler("/SStats/", HandleStatsRequest); | 138 | MainServer.Instance.AddHTTPHandler("/SStats/", HandleStatsRequest); |
131 | MainServer.Instance.AddHTTPHandler("/CAPS/VS/", HandleUnknownCAPSRequest); | 139 | MainServer.Instance.AddHTTPHandler("/CAPS/VS/", HandleUnknownCAPSRequest); |
132 | } | 140 | } |
133 | 141 | ||
134 | m_scene.Add(scene); | 142 | m_scene.Add(scene); |
135 | if (m_simstatsCounters.ContainsKey(scene.RegionInfo.RegionID)) | 143 | if (m_simstatsCounters.ContainsKey(scene.RegionInfo.RegionID)) |
136 | m_simstatsCounters.Remove(scene.RegionInfo.RegionID); | 144 | m_simstatsCounters.Remove(scene.RegionInfo.RegionID); |
@@ -140,6 +148,14 @@ namespace OpenSim.Region.UserStatistics | |||
140 | } | 148 | } |
141 | } | 149 | } |
142 | 150 | ||
151 | public void RegionLoaded(Scene scene) | ||
152 | { | ||
153 | } | ||
154 | |||
155 | public void RemoveRegion(Scene scene) | ||
156 | { | ||
157 | } | ||
158 | |||
143 | public void ReceiveClassicSimStatsPacket(SimStats stats) | 159 | public void ReceiveClassicSimStatsPacket(SimStats stats) |
144 | { | 160 | { |
145 | if (!enabled) | 161 | if (!enabled) |
@@ -308,11 +324,6 @@ namespace OpenSim.Region.UserStatistics | |||
308 | get { return "ViewerStatsModule"; } | 324 | get { return "ViewerStatsModule"; } |
309 | } | 325 | } |
310 | 326 | ||
311 | public bool IsSharedModule | ||
312 | { | ||
313 | get { return true; } | ||
314 | } | ||
315 | |||
316 | public void OnRegisterCaps(UUID agentID, Caps caps) | 327 | public void OnRegisterCaps(UUID agentID, Caps caps) |
317 | { | 328 | { |
318 | m_log.DebugFormat("[VC]: OnRegisterCaps: agentID {0} caps {1}", agentID, caps); | 329 | m_log.DebugFormat("[VC]: OnRegisterCaps: agentID {0} caps {1}", agentID, caps); |