diff options
author | Melanie | 2010-01-29 07:20:13 +0000 |
---|---|---|
committer | Melanie | 2010-01-29 07:20:13 +0000 |
commit | cfca9e1e811f6cdea6b7c3338f7f783a07f8e0ac (patch) | |
tree | 43f3fd01f30651d482f81b5ae7c25fd84cc8ca37 /OpenSim/Region/UserStatistics/WebStatsModule.cs | |
parent | Merge branch 'master' into careminster (diff) | |
download | opensim-SC-cfca9e1e811f6cdea6b7c3338f7f783a07f8e0ac.zip opensim-SC-cfca9e1e811f6cdea6b7c3338f7f783a07f8e0ac.tar.gz opensim-SC-cfca9e1e811f6cdea6b7c3338f7f783a07f8e0ac.tar.bz2 opensim-SC-cfca9e1e811f6cdea6b7c3338f7f783a07f8e0ac.tar.xz |
Revert "Updates all IRegionModules to the new style region modules."
This reverts commit ec3c31e61e5e540f822891110df9bc978655bbaf.
Diffstat (limited to '')
-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); |