From e9cef70f892bfbf4aad0e4471a958367766d849a Mon Sep 17 00:00:00 2001 From: Teravus Ovares Date: Sat, 3 Jan 2009 03:30:03 +0000 Subject: * Updates the sim stats module. Cleans out some of the rot. * Adds a prototype web stats module which is disabled by default. It's functional with one report right now, however, the database structure may change, so I don't recommend enabling this to keep actual stats right now. I'll let you know when it's safe. * Adds Prototype for ajaxy web content * removed a warning or two. --- .../Region/UserStatistics/Updater_distributor.cs | 35 ++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 OpenSim/Region/UserStatistics/Updater_distributor.cs (limited to 'OpenSim/Region/UserStatistics/Updater_distributor.cs') diff --git a/OpenSim/Region/UserStatistics/Updater_distributor.cs b/OpenSim/Region/UserStatistics/Updater_distributor.cs new file mode 100644 index 0000000..4d571fa --- /dev/null +++ b/OpenSim/Region/UserStatistics/Updater_distributor.cs @@ -0,0 +1,35 @@ +using System; +using System.IO; +using System.Collections; +using System.Collections.Generic; +using System.Text; +using OpenSim.Framework; + +namespace OpenSim.Region.UserStatistics +{ + public class Updater_distributor : IStatsController + { + private string updaterjs = string.Empty; + + + public Hashtable ProcessModel(Hashtable pParams) + { + Hashtable pResult = new Hashtable(); + if (updaterjs.Length == 0) + { + StreamReader fs = new StreamReader(new FileStream(Util.dataDir() + "/data/updater.js", FileMode.Open)); + updaterjs = fs.ReadToEnd(); + fs.Close(); + fs.Dispose(); + } + pResult["js"] = updaterjs; + return pResult; + } + + public string RenderView(Hashtable pModelResult) + { + return pModelResult["js"].ToString(); + } + + } +} \ No newline at end of file -- cgit v1.1