Exemplo n.º 1
0
        public virtual void PostInitialise()
        {
            if (!enabled)
            {
                return;
            }

            if (Util.IsWindows())
            {
                Util.LoadArchSpecificWindowsDll("sqlite3.dll");
            }

            //IConfig startupConfig = config.Configs["Startup"];

            dbConn = new SqliteConnection("URI=file:LocalUserStatistics.db,version=3");
            dbConn.Open();
            CreateTables(dbConn);

            Prototype_distributor protodep       = new Prototype_distributor();
            Updater_distributor   updatedep      = new Updater_distributor();
            ActiveConnectionsAJAX ajConnections  = new ActiveConnectionsAJAX();
            SimStatsAJAX          ajSimStats     = new SimStatsAJAX();
            LogLinesAJAX          ajLogLines     = new LogLinesAJAX();
            Default_Report        defaultReport  = new Default_Report();
            Clients_report        clientReport   = new Clients_report();
            Sessions_Report       sessionsReport = new Sessions_Report();

            reports.Add("prototype.js", protodep);
            reports.Add("updater.js", updatedep);
            reports.Add("activeconnectionsajax.html", ajConnections);
            reports.Add("simstatsajax.html", ajSimStats);
            reports.Add("activelogajax.html", ajLogLines);
            reports.Add("default.report", defaultReport);
            reports.Add("clients.report", clientReport);
            reports.Add("sessions.report", sessionsReport);

            ////
            // Add Your own Reports here (Do Not Modify Lines here Devs!)
            ////

            ////
            // End Own reports section
            ////

            MainServer.Instance.AddHTTPHandler("/SStats/", HandleStatsRequest);
            MainServer.Instance.AddHTTPHandler("/CAPS/VS/", HandleUnknownCAPSRequest);
        }
        public virtual void PostInitialise()
        {
            if (!enabled)
                return;

            if (Util.IsWindows())
                Util.LoadArchSpecificWindowsDll("sqlite3.dll");

            //IConfig startupConfig = config.Configs["Startup"];

            dbConn = new SqliteConnection("URI=file:LocalUserStatistics.db,version=3");
            dbConn.Open();
            CreateTables(dbConn);

            Prototype_distributor protodep = new Prototype_distributor();
            Updater_distributor updatedep = new Updater_distributor();
            ActiveConnectionsAJAX ajConnections = new ActiveConnectionsAJAX();
            SimStatsAJAX ajSimStats = new SimStatsAJAX();
            LogLinesAJAX ajLogLines = new LogLinesAJAX();
            Default_Report defaultReport = new Default_Report();
            Clients_report clientReport = new Clients_report();
            Sessions_Report sessionsReport = new Sessions_Report();

            reports.Add("prototype.js", protodep);
            reports.Add("updater.js", updatedep);
            reports.Add("activeconnectionsajax.html", ajConnections);
            reports.Add("simstatsajax.html", ajSimStats);
            reports.Add("activelogajax.html", ajLogLines);
            reports.Add("default.report", defaultReport);
            reports.Add("clients.report", clientReport);
            reports.Add("sessions.report", sessionsReport);

            reports.Add("sim.css", new Prototype_distributor("sim.css"));
            reports.Add("sim.html", new Prototype_distributor("sim.html"));
            reports.Add("jquery.js", new Prototype_distributor("jquery.js"));

            ////
            // Add Your own Reports here (Do Not Modify Lines here Devs!)
            ////

            ////
            // End Own reports section
            ////

            MainServer.Instance.AddHTTPHandler("/SStats/", HandleStatsRequest);
            MainServer.Instance.AddHTTPHandler("/CAPS/VS/", HandleUnknownCAPSRequest);
        }
Exemplo n.º 3
0
        public virtual void Initialise(Scene scene, IConfigSource config)
        {
            IConfig cnfg = config.Configs["WebStats"];

            if (cnfg != null)
            {
                enabled = cnfg.GetBoolean("enabled", false);
            }

            if (!enabled)
            {
                return;
            }

            lock (m_scenes)
            {
                if (m_scenes.Count == 0)
                {
                    if (Util.IsWindows())
                    {
                        Util.LoadArchSpecificWindowsDll("sqlite3.dll");
                    }

                    //IConfig startupConfig = config.Configs["Startup"];

                    dbConn = new SqliteConnection("URI=file:LocalUserStatistics.db,version=3");
                    dbConn.Open();
                    CreateTables(dbConn);

                    Prototype_distributor protodep       = new Prototype_distributor();
                    Updater_distributor   updatedep      = new Updater_distributor();
                    ActiveConnectionsAJAX ajConnections  = new ActiveConnectionsAJAX();
                    SimStatsAJAX          ajSimStats     = new SimStatsAJAX();
                    LogLinesAJAX          ajLogLines     = new LogLinesAJAX();
                    Default_Report        defaultReport  = new Default_Report();
                    Clients_report        clientReport   = new Clients_report();
                    Sessions_Report       sessionsReport = new Sessions_Report();

                    reports.Add("prototype.js", protodep);
                    reports.Add("updater.js", updatedep);
                    reports.Add("activeconnectionsajax.html", ajConnections);
                    reports.Add("simstatsajax.html", ajSimStats);
                    reports.Add("activelogajax.html", ajLogLines);
                    reports.Add("default.report", defaultReport);
                    reports.Add("clients.report", clientReport);
                    reports.Add("sessions.report", sessionsReport);

                    ////
                    // Add Your own Reports here (Do Not Modify Lines here Devs!)
                    ////

                    ////
                    // End Own reports section
                    ////

                    MainServer.Instance.AddHTTPHandler("/SStats/", HandleStatsRequest);
                    MainServer.Instance.AddHTTPHandler("/CAPS/VS/", HandleUnknownCAPSRequest);
                }

                m_scenes.Add(scene);
                if (m_simstatsCounters.ContainsKey(scene.RegionInfo.RegionID))
                {
                    m_simstatsCounters.Remove(scene.RegionInfo.RegionID);
                }

                m_simstatsCounters.Add(scene.RegionInfo.RegionID, new USimStatsData(scene.RegionInfo.RegionID));
                scene.StatsReporter.OnSendStatsResult += ReceiveClassicSimStatsPacket;
            }
        }
Exemplo n.º 4
0
        public void AddRegion(Scene scene)
        {
            if (!enabled)
                return;
            
            lock (m_scene)
            {
                if (m_scene.Count == 0)
                {
                    dataConnector = Aurora.DataManager.DataManager.RequestPlugin<IWebStatsDataConnector>();
                    if (dataConnector == null)
                    {
                        enabled = false;
                        return;
                    }
                    Default_Report rep = new Default_Report();
                    Prototype_distributor protodep = new Prototype_distributor();
                    Updater_distributor updatedep = new Updater_distributor();
                    ActiveConnectionsAJAX ajConnections = new ActiveConnectionsAJAX();
                    SimStatsAJAX ajSimStats = new SimStatsAJAX();
                    LogLinesAJAX ajLogLines = new LogLinesAJAX();
                    Clients_report clientReport = new Clients_report();
                    Sessions_Report sessionsReport = new Sessions_Report();

                    reports.Add("home", rep);
                    reports.Add("", rep);
                    reports.Add("prototype.js", protodep);
                    reports.Add("updater.js", updatedep);
                    reports.Add("activeconnectionsajax.html", ajConnections);
                    reports.Add("simstatsajax.html", ajSimStats);
                    reports.Add("activelogajax.html", ajLogLines);
                    reports.Add("clients.report", clientReport);
                    reports.Add("sessions.report", sessionsReport);



                    ////
                    // Add Your own Reports here (Do Not Modify Lines here Devs!)
                    ////

                    ////
                    // End Own reports section
                    //// 


                    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);

                m_simstatsCounters.Add(scene.RegionInfo.RegionID, new USimStatsData(scene.RegionInfo.RegionID));
                scene.StatsReporter.OnSendStatsResult += ReceiveClassicSimStatsPacket;
            }
        }
Exemplo n.º 5
0
        public void AddRegion(Scene scene)
        {
            if (!enabled)
            {
                return;
            }

            lock (m_scene)
            {
                if (m_scene.Count == 0)
                {
                    dataConnector = Aurora.DataManager.DataManager.RequestPlugin <IWebStatsDataConnector>();
                    if (dataConnector == null)
                    {
                        enabled = false;
                        return;
                    }
                    Default_Report        rep            = new Default_Report();
                    Prototype_distributor protodep       = new Prototype_distributor();
                    Updater_distributor   updatedep      = new Updater_distributor();
                    ActiveConnectionsAJAX ajConnections  = new ActiveConnectionsAJAX();
                    SimStatsAJAX          ajSimStats     = new SimStatsAJAX();
                    LogLinesAJAX          ajLogLines     = new LogLinesAJAX();
                    Clients_report        clientReport   = new Clients_report();
                    Sessions_Report       sessionsReport = new Sessions_Report();

                    reports.Add("home", rep);
                    reports.Add("", rep);
                    reports.Add("prototype.js", protodep);
                    reports.Add("updater.js", updatedep);
                    reports.Add("activeconnectionsajax.html", ajConnections);
                    reports.Add("simstatsajax.html", ajSimStats);
                    reports.Add("activelogajax.html", ajLogLines);
                    reports.Add("clients.report", clientReport);
                    reports.Add("sessions.report", sessionsReport);



                    ////
                    // Add Your own Reports here (Do Not Modify Lines here Devs!)
                    ////

                    ////
                    // End Own reports section
                    ////


                    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);
                }

                m_simstatsCounters.Add(scene.RegionInfo.RegionID, new USimStatsData(scene.RegionInfo.RegionID));
                IMonitorModule mod = scene.RequestModuleInterface <IMonitorModule>();
                if (mod != null)
                {
                    mod.OnSendStatsResult += ReceiveClassicSimStatsPacket;
                }
            }
        }
Exemplo n.º 6
0
        public virtual void Initialise(Scene scene, IConfigSource config)
        {
            IConfig cnfg = config.Configs["WebStats"];

            if (cnfg != null)
                enabled = cnfg.GetBoolean("enabled", false);
            
            if (!enabled)
                return;

            lock (m_scenes)
            {
                if (m_scenes.Count == 0)
                {
                    if (Util.IsWindows())
                        Util.LoadArchSpecificWindowsDll("sqlite3.dll");
                    
                    //IConfig startupConfig = config.Configs["Startup"];

                    dbConn = new SqliteConnection("URI=file:LocalUserStatistics.db,version=3");
                    dbConn.Open();
                    CreateTables(dbConn);

                    Prototype_distributor protodep = new Prototype_distributor();
                    Updater_distributor updatedep = new Updater_distributor();
                    ActiveConnectionsAJAX ajConnections = new ActiveConnectionsAJAX();
                    SimStatsAJAX ajSimStats = new SimStatsAJAX();
                    LogLinesAJAX ajLogLines = new LogLinesAJAX();
                    Default_Report defaultReport = new Default_Report();
                    Clients_report clientReport = new Clients_report();
                    Sessions_Report sessionsReport = new Sessions_Report();

                    reports.Add("prototype.js", protodep);
                    reports.Add("updater.js", updatedep);
                    reports.Add("activeconnectionsajax.html", ajConnections);
                    reports.Add("simstatsajax.html", ajSimStats);
                    reports.Add("activelogajax.html", ajLogLines);
                    reports.Add("default.report", defaultReport);
                    reports.Add("clients.report", clientReport);
                    reports.Add("sessions.report", sessionsReport);

                    ////
                    // Add Your own Reports here (Do Not Modify Lines here Devs!)
                    ////

                    ////
                    // End Own reports section
                    ////

                    MainServer.Instance.AddHTTPHandler("/SStats/", HandleStatsRequest);
                    MainServer.Instance.AddHTTPHandler("/CAPS/VS/", HandleUnknownCAPSRequest);
                }
                
                m_scenes.Add(scene);
                if (m_simstatsCounters.ContainsKey(scene.RegionInfo.RegionID))
                    m_simstatsCounters.Remove(scene.RegionInfo.RegionID);

                m_simstatsCounters.Add(scene.RegionInfo.RegionID, new USimStatsData(scene.RegionInfo.RegionID));
                scene.StatsReporter.OnSendStatsResult += ReceiveClassicSimStatsPacket;
            }
        }
Exemplo n.º 7
0
        public void AddRegion(Scene scene)
        {
            if (!enabled)
                return;
            
            lock (m_scene)
            {
                if (m_scene.Count == 0)
                {
                    //IConfig startupConfig = config.Configs["Startup"];

                    dbConn = new SqliteConnection("URI=file:LocalUserStatistics.db,version=3");
                    dbConn.Open();
                    CheckAndUpdateDatabase(dbConn);

                    Default_Report rep = new Default_Report();
                    Prototype_distributor protodep = new Prototype_distributor();
                    Updater_distributor updatedep = new Updater_distributor();
                    ActiveConnectionsAJAX ajConnections = new ActiveConnectionsAJAX();
                    SimStatsAJAX ajSimStats = new SimStatsAJAX();
                    LogLinesAJAX ajLogLines = new LogLinesAJAX();
                    Clients_report clientReport = new Clients_report();
                    Sessions_Report sessionsReport = new Sessions_Report();

                    reports.Add("", rep);
                    reports.Add("prototype.js", protodep);
                    reports.Add("updater.js", updatedep);
                    reports.Add("activeconnectionsajax.html", ajConnections);
                    reports.Add("simstatsajax.html", ajSimStats);
                    reports.Add("activelogajax.html", ajLogLines);
                    reports.Add("clients.report", clientReport);
                    reports.Add("sessions.report", sessionsReport);



                    ////
                    // Add Your own Reports here (Do Not Modify Lines here Devs!)
                    ////

                    ////
                    // End Own reports section
                    //// 


                    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);

                m_simstatsCounters.Add(scene.RegionInfo.RegionID, new USimStatsData(scene.RegionInfo.RegionID));
                scene.StatsReporter.OnSendStatsResult += ReceiveClassicSimStatsPacket;
            }
        }