aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/UserStatistics
diff options
context:
space:
mode:
authorMelanie2010-01-29 07:20:13 +0000
committerMelanie2010-01-29 07:21:06 +0000
commita87a247f0548d39a8c39b1d28123d7da8db44598 (patch)
tree7f9f77c38a224bc6d4bea7ccced1d4710c8a91b1 /OpenSim/Region/UserStatistics
parentMerge branch 'master' of melanie@opensimulator.org:/var/git/opensim (diff)
downloadopensim-SC-a87a247f0548d39a8c39b1d28123d7da8db44598.zip
opensim-SC-a87a247f0548d39a8c39b1d28123d7da8db44598.tar.gz
opensim-SC-a87a247f0548d39a8c39b1d28123d7da8db44598.tar.bz2
opensim-SC-a87a247f0548d39a8c39b1d28123d7da8db44598.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.cs33
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;
34using System.Text; 34using System.Text;
35using System.Threading; 35using System.Threading;
36using log4net; 36using log4net;
37using Mono.Addins;
38using Nini.Config; 37using Nini.Config;
39using OpenMetaverse; 38using OpenMetaverse;
40using OpenMetaverse.StructuredData; 39using OpenMetaverse.StructuredData;
@@ -53,8 +52,7 @@ using OSDMap = OpenMetaverse.StructuredData.OSDMap;
53 52
54namespace OpenSim.Region.UserStatistics 53namespace 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);