From 3ac43d012031cae8189111d96b7350b3e931836c Mon Sep 17 00:00:00 2001 From: lbsa71 Date: Mon, 24 Sep 2007 23:58:43 +0000 Subject: * Removed some more fields from CommunicationsLocal * added OnLoginToRegion to CommunicationsLocal --- .../Communications/Local/CommunicationsLocal.cs | 35 ++++++---------------- 1 file changed, 9 insertions(+), 26 deletions(-) (limited to 'OpenSim/Region/Communications/Local/CommunicationsLocal.cs') diff --git a/OpenSim/Region/Communications/Local/CommunicationsLocal.cs b/OpenSim/Region/Communications/Local/CommunicationsLocal.cs index eed21a4..a00b35f 100644 --- a/OpenSim/Region/Communications/Local/CommunicationsLocal.cs +++ b/OpenSim/Region/Communications/Local/CommunicationsLocal.cs @@ -38,43 +38,26 @@ using OpenSim.Framework.Utilities; namespace OpenSim.Region.Communications.Local { public class CommunicationsLocal : CommunicationsManager - { - public LocalBackEndServices InstanceServices; - - public LocalLoginService LoginServices; - - protected LocalSettings m_settings; - - protected CommunicationsLocal(NetworkServersInfo serversInfo, BaseHttpServer httpServer, AssetCache assetCache) - : base(serversInfo, httpServer, assetCache) - { - - } - + { public CommunicationsLocal(NetworkServersInfo serversInfo, BaseHttpServer httpServer, AssetCache assetCache, LocalSettings settings) : base(serversInfo, httpServer, assetCache) { - m_settings = settings; - LocalInventoryService inventoryService = new LocalInventoryService(); - inventoryService.AddPlugin(m_settings.InventoryPlugin); + inventoryService.AddPlugin(settings.InventoryPlugin); m_inventoryService = inventoryService; LocalUserServices userService = new LocalUserServices(this, serversInfo); - userService.AddPlugin(m_settings.UserDatabasePlugin); + userService.AddPlugin(settings.UserDatabasePlugin); m_userService = userService; - InstanceServices = new LocalBackEndServices(); - m_gridService = InstanceServices; - m_interRegion = InstanceServices; + LocalBackEndServices backendService = new LocalBackEndServices(); + m_gridService = backendService; + m_interRegion = backendService; - LoginServices = new LocalLoginService(userService, m_settings.WelcomeMessage, this, serversInfo, m_settings.AccountAuthentication); - httpServer.AddXmlRPCHandler("login_to_simulator", LoginServices.XmlRpcLoginMethod); - } + LocalLoginService loginService = new LocalLoginService(userService, settings.WelcomeMessage, this, serversInfo, settings.AccountAuthentication); + loginService.OnLoginToRegion += backendService.AddNewSession; - internal void InformRegionOfLogin(ulong regionHandle, Login login) - { - this.InstanceServices.AddNewSession(regionHandle, login); + httpServer.AddXmlRPCHandler("login_to_simulator", loginService.XmlRpcLoginMethod); } public void doCreate(string[] cmmdParams) -- cgit v1.1