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