From 90c853685c14e186a3dfd06b7a584d16bf520ccf Mon Sep 17 00:00:00 2001 From: Justin Clarke Casey Date: Fri, 25 Jan 2008 19:24:25 +0000 Subject: * Add very basic initial login stats to the user server * Typing 'stats' on the command line will given total number of successful logins today and yesterday * A little bit more to come, probably * Refactoring will follow next --- OpenSim/Region/Application/OpenSimMain.cs | 3 ++- OpenSim/Region/Communications/Local/LocalLoginService.cs | 10 ++++++---- OpenSim/Region/Examples/SimpleApp/Program.cs | 3 ++- 3 files changed, 10 insertions(+), 6 deletions(-) (limited to 'OpenSim/Region') diff --git a/OpenSim/Region/Application/OpenSimMain.cs b/OpenSim/Region/Application/OpenSimMain.cs index 9da1c05..9484e15 100644 --- a/OpenSim/Region/Application/OpenSimMain.cs +++ b/OpenSim/Region/Application/OpenSimMain.cs @@ -327,9 +327,10 @@ namespace OpenSim inventoryService, backendService, backendService, m_dumpAssetsToFile); m_commsManager = localComms; + // TODO No user stats collection yet for standalone m_loginService = new LocalLoginService(userService, m_standaloneWelcomeMessage, localComms, m_networkServersInfo, - m_standaloneAuthenticate); + null, m_standaloneAuthenticate); m_loginService.OnLoginToRegion += backendService.AddNewSession; // XMLRPC action diff --git a/OpenSim/Region/Communications/Local/LocalLoginService.cs b/OpenSim/Region/Communications/Local/LocalLoginService.cs index 38f1970..7dee2cb 100644 --- a/OpenSim/Region/Communications/Local/LocalLoginService.cs +++ b/OpenSim/Region/Communications/Local/LocalLoginService.cs @@ -34,6 +34,7 @@ using libsecondlife; using OpenSim.Framework; using OpenSim.Framework.Communications.Cache; using OpenSim.Framework.Console; +using OpenSim.Framework.Statistics; using OpenSim.Framework.UserManagement; using InventoryFolder=OpenSim.Framework.InventoryFolder; @@ -52,9 +53,10 @@ namespace OpenSim.Region.Communications.Local public event LoginToRegionEvent OnLoginToRegion; - public LocalLoginService(UserManagerBase userManager, string welcomeMess, CommunicationsLocal parent, - NetworkServersInfo serversInfo, bool authenticate) - : base(userManager, parent.UserProfileCacheService.libraryRoot, welcomeMess) + public LocalLoginService(UserManagerBase userManager, string welcomeMess, + CommunicationsLocal parent, NetworkServersInfo serversInfo, + UserStatsReporter statsCollector, bool authenticate) + : base(userManager, parent.UserProfileCacheService.libraryRoot, statsCollector, welcomeMess) { m_Parent = parent; this.serversInfo = serversInfo; @@ -228,4 +230,4 @@ namespace OpenSim.Region.Communications.Local } } -} \ No newline at end of file +} diff --git a/OpenSim/Region/Examples/SimpleApp/Program.cs b/OpenSim/Region/Examples/SimpleApp/Program.cs index 8b8bcf4..485d657 100644 --- a/OpenSim/Region/Examples/SimpleApp/Program.cs +++ b/OpenSim/Region/Examples/SimpleApp/Program.cs @@ -88,7 +88,8 @@ namespace SimpleApp m_commsManager = localComms; LocalLoginService loginService = - new LocalLoginService(userService, String.Empty, localComms, m_networkServersInfo, false); + new LocalLoginService( + userService, String.Empty, localComms, m_networkServersInfo, null, false); loginService.OnLoginToRegion += backendService.AddNewSession; m_httpServer.AddXmlRPCHandler("login_to_simulator", loginService.XmlRpcLoginMethod); -- cgit v1.1