aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/UserStatistics
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--OpenSim/Region/UserStatistics/WebStatsModule.cs33
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;
34using System.Text; 34using System.Text;
35using System.Threading; 35using System.Threading;
36using log4net; 36using log4net;
37using Mono.Addins;
37using Nini.Config; 38using Nini.Config;
38using OpenMetaverse; 39using OpenMetaverse;
39using OpenMetaverse.StructuredData; 40using OpenMetaverse.StructuredData;
@@ -52,7 +53,8 @@ using OSDMap = OpenMetaverse.StructuredData.OSDMap;
52 53
53namespace OpenSim.Region.UserStatistics 54namespace 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);