diff options
author | Melanie | 2010-01-26 14:53:14 +0000 |
---|---|---|
committer | Melanie | 2010-01-26 14:53:14 +0000 |
commit | b80ea002654bd0ab232aee2b0f842be18b8d4edc (patch) | |
tree | 35971637efd7ec9cbfaee88bc5ea56edffddfc1b /OpenSim/Region/UserStatistics | |
parent | Merge branch 'master' of ssh://melanie@3dhosting.de/var/git/careminster into ... (diff) | |
parent | Replace dome tabs with spaces (diff) | |
download | opensim-SC-b80ea002654bd0ab232aee2b0f842be18b8d4edc.zip opensim-SC-b80ea002654bd0ab232aee2b0f842be18b8d4edc.tar.gz opensim-SC-b80ea002654bd0ab232aee2b0f842be18b8d4edc.tar.bz2 opensim-SC-b80ea002654bd0ab232aee2b0f842be18b8d4edc.tar.xz |
Merge branch 'master' into careminster
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); |