From ec3c31e61e5e540f822891110df9bc978655bbaf Mon Sep 17 00:00:00 2001 From: Revolution Date: Fri, 22 Jan 2010 18:09:33 -0600 Subject: Updates all IRegionModules to the new style region modules. Signed-off-by: Melanie --- OpenSim/Region/UserStatistics/WebStatsModule.cs | 33 ++++++++++++++++--------- 1 file changed, 22 insertions(+), 11 deletions(-) (limited to 'OpenSim/Region/UserStatistics/WebStatsModule.cs') 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; using System.Text; using System.Threading; using log4net; +using Mono.Addins; using Nini.Config; using OpenMetaverse; using OpenMetaverse.StructuredData; @@ -52,7 +53,8 @@ using OSDMap = OpenMetaverse.StructuredData.OSDMap; namespace OpenSim.Region.UserStatistics { - public class WebStatsModule : IRegionModule + [Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule")] + public class WebStatsModule : ISharedRegionModule { private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); @@ -70,7 +72,7 @@ namespace OpenSim.Region.UserStatistics private string m_loglines = String.Empty; private volatile int lastHit = 12000; - public virtual void Initialise(Scene scene, IConfigSource config) + public virtual void Initialise(IConfigSource config) { IConfig cnfg; try @@ -82,11 +84,17 @@ namespace OpenSim.Region.UserStatistics { enabled = false; } - + } + + public Type ReplaceableInterface + { + get { return null; } + } + + public void AddRegion(Scene scene) + { if (!enabled) - { return; - } lock (m_scene) { @@ -130,7 +138,7 @@ namespace OpenSim.Region.UserStatistics MainServer.Instance.AddHTTPHandler("/SStats/", HandleStatsRequest); MainServer.Instance.AddHTTPHandler("/CAPS/VS/", HandleUnknownCAPSRequest); } - + m_scene.Add(scene); if (m_simstatsCounters.ContainsKey(scene.RegionInfo.RegionID)) m_simstatsCounters.Remove(scene.RegionInfo.RegionID); @@ -140,6 +148,14 @@ namespace OpenSim.Region.UserStatistics } } + public void RegionLoaded(Scene scene) + { + } + + public void RemoveRegion(Scene scene) + { + } + public void ReceiveClassicSimStatsPacket(SimStats stats) { if (!enabled) @@ -308,11 +324,6 @@ namespace OpenSim.Region.UserStatistics get { return "ViewerStatsModule"; } } - public bool IsSharedModule - { - get { return true; } - } - public void OnRegisterCaps(UUID agentID, Caps caps) { m_log.DebugFormat("[VC]: OnRegisterCaps: agentID {0} caps {1}", agentID, caps); -- cgit v1.1